mirror of
https://github.com/nodejs/node.git
synced 2025-05-05 15:32:15 +00:00

* Favor strictEqual * Use const where appropriate * Modernize where possible PR-URL: https://github.com/nodejs/node/pull/8468 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
16 lines
461 B
JavaScript
16 lines
461 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const util = require('util');
|
|
const assert = require('assert');
|
|
const exec = require('child_process').exec;
|
|
|
|
const cmd = [
|
|
`"${process.execPath}"`, '-e',
|
|
'"console.error(process.argv)"',
|
|
'foo', 'bar'].join(' ');
|
|
const expected = util.format([process.execPath, 'foo', 'bar']) + '\n';
|
|
exec(cmd, common.mustCall((err, stdout, stderr) => {
|
|
assert.ifError(err);
|
|
assert.strictEqual(stderr, expected);
|
|
}));
|