0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 15:30:56 +01:00
Commit Graph

2 Commits

Author SHA1 Message Date
cjihrig
04b4d15b39 test: use mustCall() for simple flow tracking
Many of the tests use variables to track when callback functions
are invoked or events are emitted. These variables are then
asserted on process exit. This commit replaces this pattern in
straightforward cases with common.mustCall(). This makes the
tests easier to reason about, leads to a net reduction in lines
of code, and uncovered a few bugs in tests. This commit also
replaces some callbacks that should never be called with
common.fail().

PR-URL: https://github.com/nodejs/node/pull/7753
Reviewed-By: Wyatt Preul <wpreul@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-07-18 17:14:16 -04:00
Santiago Gimeno
2dc5ad460a test: move more tests from sequential to parallel
Only `test-stdin-from-file.js` has been modified so that the `stdin.txt`
is written in a temp directory instead of the `fixtures` directory.

PR-URL: https://github.com/nodejs/node/pull/6187
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-04-20 09:14:33 -07:00