Skip to content

Commit

Permalink
test: refactor test-child-process-exec-error
Browse files Browse the repository at this point in the history
* assert.equal() -> assert.strictEqual()
* regex -> .include()
* Change variable representing a function from `fun` to idiomatic `fn`
* var -> const

PR-URL: #9780
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: Prince John Wesley <[email protected]>
  • Loading branch information
Trott authored and MylesBorins committed Dec 21, 2016
1 parent b56aa6a commit 257e1a8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/parallel/test-child-process-exec-error.js
Original file line number Diff line number Diff line change
@@ -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'));
}));
}

Expand Down

0 comments on commit 257e1a8

Please sign in to comment.