summaryrefslogtreecommitdiff
path: root/test/parallel/test-repl-null-thrown.js
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2018-02-11 19:17:03 +0100
committerRuben Bridgewater <ruben@bridgewater.de>2018-02-12 15:42:06 +0100
commit1fc373bdf6758dcf045db21e4a075e4099ca7c19 (patch)
tree6845172f59c4bdf9be6d37efadc502e867adb248 /test/parallel/test-repl-null-thrown.js
parent60c9ad797994e544af21ce991dce2c3360ae1801 (diff)
downloadandroid-node-v8-1fc373bdf6758dcf045db21e4a075e4099ca7c19.tar.gz
android-node-v8-1fc373bdf6758dcf045db21e4a075e4099ca7c19.tar.bz2
android-node-v8-1fc373bdf6758dcf045db21e4a075e4099ca7c19.zip
Revert "repl: refactor tests to not rely on timing"
This reverts commit de848ac1e0483327a2ce8716c3f8567eaeacb660. The commit broke multiline repl. PR-URL: https://github.com/nodejs/node/pull/18715 Refs: https://github.com/nodejs/node/pull/17828 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'test/parallel/test-repl-null-thrown.js')
-rw-r--r--test/parallel/test-repl-null-thrown.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/parallel/test-repl-null-thrown.js b/test/parallel/test-repl-null-thrown.js
index 9b78b0b1dc..1fe5d30396 100644
--- a/test/parallel/test-repl-null-thrown.js
+++ b/test/parallel/test-repl-null-thrown.js
@@ -1,5 +1,5 @@
'use strict';
-const common = require('../common');
+require('../common');
const repl = require('repl');
const assert = require('assert');
const Stream = require('stream');
@@ -18,6 +18,7 @@ const replserver = repl.start({
replserver.emit('line', 'process.nextTick(() => { throw null; })');
replserver.emit('line', '.exit');
-replserver.on('exit', common.mustCall(() => {
+setTimeout(() => {
+ console.log(text);
assert(text.includes('Thrown: null'));
-}));
+}, 0);