Skip to content

Commit

Permalink
test-child-process-flush-stdio: review changes
Browse files Browse the repository at this point in the history
Make the spawned process object a const, and add assertions to the event handler that the arguments are as expected
  • Loading branch information
Dave committed Nov 30, 2015
1 parent d13f74f commit 4becc69
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/parallel/test-child-process-flush-stdio.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
'use strict';
const cp = require('child_process');
const common = require('../common');
const assert = require('assert');

var p = cp.spawn('echo');
const p = cp.spawn('echo');

p.on('close', common.mustCall(function() {}));
p.on('close', common.mustCall(function(code, signal) {
assert.strictEqual(code, 0);
assert.strictEqual(signal, null);
}));

p.stdout.read();

Expand Down

0 comments on commit 4becc69

Please sign in to comment.