diff --git a/test/parallel/test-process-argv-0.js b/test/parallel/test-process-argv-0.js index b67601a2556fee..fb6df310e14661 100644 --- a/test/parallel/test-process-argv-0.js +++ b/test/parallel/test-process-argv-0.js @@ -1,12 +1,7 @@ 'use strict'; -var util = require('util'); var path = require('path'); var assert = require('assert'); var spawn = require('child_process').spawn; -var common = require('../common'); - -console.error('argv=%j', process.argv); -console.error('exec=%j', process.execPath); if (process.argv[2] !== 'child') { var child = spawn(process.execPath, [__filename, 'child'], { @@ -14,15 +9,10 @@ if (process.argv[2] !== 'child') { }); var childArgv0 = ''; - var childErr = ''; child.stdout.on('data', function(chunk) { childArgv0 += chunk; }); - child.stderr.on('data', function(chunk) { - childErr += chunk; - }); - child.on('exit', function() { - console.error('CHILD: %s', childErr.trim().split('\n').join('\nCHILD: ')); + process.on('exit', function() { assert.equal(childArgv0, process.execPath); }); }