Skip to content

Commit

Permalink
test: wrap functions containing assertions inside a common.mustCall
Browse files Browse the repository at this point in the history
  • Loading branch information
sagirk committed Nov 21, 2018
1 parent 0767eba commit 91fa0e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-child-process-env.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ child.stdout.on('data', (chunk) => {
response += chunk;
});

process.on('exit', () => {
process.on('exit', common.mustCall(() => {
assert.ok(response.includes('HELLO=WORLD'));
assert.ok(response.includes('FOO=BAR'));
assert.ok(!response.includes('UNDEFINED=undefined'));
assert.ok(response.includes('NULL=null'));
assert.ok(response.includes(`EMPTY=${os.EOL}`));
});
}));

0 comments on commit 91fa0e1

Please sign in to comment.