summaryrefslogtreecommitdiff
path: root/test/parallel/test-repl-pretty-stack.js
diff options
context:
space:
mode:
authorBradley Farias <bradley.meck@gmail.com>2017-12-22 11:19:50 -0600
committerRuben Bridgewater <ruben@bridgewater.de>2018-02-10 14:19:54 +0100
commitde848ac1e0483327a2ce8716c3f8567eaeacb660 (patch)
tree5395e33d22cd318f618b24752e178f68f40e851f /test/parallel/test-repl-pretty-stack.js
parent6007a9cc0e361d428123e4c0f74024c6cd7815f4 (diff)
downloadnode-new-de848ac1e0483327a2ce8716c3f8567eaeacb660.tar.gz
repl: refactor tests to not rely on timing
Tests relying on synchronous timing have been migrated to use events. PR-URL: https://github.com/nodejs/node/pull/17828 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Diffstat (limited to 'test/parallel/test-repl-pretty-stack.js')
-rw-r--r--test/parallel/test-repl-pretty-stack.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/parallel/test-repl-pretty-stack.js b/test/parallel/test-repl-pretty-stack.js
index 0fc6b3ada0..55f37e1703 100644
--- a/test/parallel/test-repl-pretty-stack.js
+++ b/test/parallel/test-repl-pretty-stack.js
@@ -22,7 +22,9 @@ function run({ command, expected }) {
});
r.write(`${command}\n`);
- assert.strictEqual(accum, expected);
+ r.on('exit', common.mustCall(() => {
+ assert.strictEqual(accum, expected);
+ }));
r.close();
}