Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test-child-process-flush-stdio: review changes
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
commit 4becc69ed9bbe99a55d7e120d04c58b0db7a8a55
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