mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
test: refactor test-child-process-exec-error
* assert.equal() -> assert.strictEqual() * regex -> .include() * Change variable representing a function from `fun` to idiomatic `fn` * var -> const PR-URL: https://github.com/nodejs/node/pull/9780 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
This commit is contained in:
1 parent
9554a974d1
commit
b763a31af0
1 file changed
+7
-7
@@ -1,12 +1,12 @@
|
||||
'use strict';
|
||||
var common = require('../common');
|
||||
var assert = require('assert');
|
||||
var child_process = require('child_process');
|
||||
const common = require('../common');
|
||||
const assert = require('assert');
|
||||
const child_process = require('child_process');
|
||||
|
||||
function test(fun, code) {
|
||||
fun('does-not-exist', common.mustCall(function(err) {
|
||||
assert.equal(err.code, code);
|
||||
assert(/does\-not\-exist/.test(err.cmd));
|
||||
function test(fn, code) {
|
||||
fn('does-not-exist', common.mustCall(function(err) {
|
||||
assert.strictEqual(err.code, code);
|
||||
assert(err.cmd.includes('does-not-exist'));
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user