diff options
author | Bradley Farias <bradley.meck@gmail.com> | 2017-12-22 11:19:50 -0600 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2018-02-10 14:19:54 +0100 |
commit | de848ac1e0483327a2ce8716c3f8567eaeacb660 (patch) | |
tree | 5395e33d22cd318f618b24752e178f68f40e851f /test/parallel/test-repl-pretty-stack.js | |
parent | 6007a9cc0e361d428123e4c0f74024c6cd7815f4 (diff) | |
download | node-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.js | 4 |
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(); } |