Skip to content
Closed
Changes from all commits
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
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
  • Loading branch information
Trott committed Nov 24, 2016
commit 9971283c569e19f3037cbc9b694060c617d90468
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