We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 509039f commit 14f6a5aCopy full SHA for 14f6a5a
test/parallel/test-force-repl.js
@@ -3,16 +3,13 @@ const common = require('../common');
3
const assert = require('assert');
4
const spawn = require('child_process').spawn;
5
6
-// spawn a node child process in "interactive" mode (force the repl)
+// Spawn a node child process in interactive mode (enabling the REPL) and
7
+// confirm the '> ' prompt is included in the output.
8
const cp = spawn(process.execPath, ['-i']);
-// give node + the repl 5 seconds to start
9
-const timeoutId = setTimeout(common.mustNotCall(),
10
- common.platformTimeout(5000));
11
12
cp.stdout.setEncoding('utf8');
13
14
cp.stdout.once('data', common.mustCall(function(b) {
15
- clearTimeout(timeoutId);
16
assert.strictEqual(b, '> ');
17
cp.kill();
18
}));
0 commit comments