Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: refactor stdin-script-child #10321

Closed
wants to merge 2 commits into from
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
Wrap the callback with common.mustCall
  • Loading branch information
emanuelbuholzer committed Dec 22, 2016
commit f7e5be5f3fd9fc5a589b391947605bba7323f93c
6 changes: 3 additions & 3 deletions test/parallel/test-stdin-script-child.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
require('../common');
const common = require('../common');
const assert = require('assert');

const spawn = require('child_process').spawn;
Expand All @@ -21,11 +21,11 @@ child.stderr.on('data', function(c) {
console.error('> ' + c.trim().split(/\n/).join('\n> '));
});

child.on('close', function(c) {
child.on('close', common.mustCall(function(c) {
assert.strictEqual(c, 0);
assert.strictEqual(found, wanted);
console.log('ok');
});
}));

setTimeout(function() {
child.stdin.end('console.log(process.pid)');
Expand Down