From d1f5e99a2a0b1056ef214b51dd99eebcc9f3f49e Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 23 Nov 2016 22:19:24 -0800 Subject: [PATCH] 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 Reviewed-By: Colin Ihrig Reviewed-By: Michael Dawson Reviewed-By: Evan Lucas Reviewed-By: Prince John Wesley --- test/parallel/test-child-process-exec-error.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/parallel/test-child-process-exec-error.js b/test/parallel/test-child-process-exec-error.js index 006a2eebb912d0..f937fec5d252fc 100644 --- a/test/parallel/test-child-process-exec-error.js +++ b/test/parallel/test-child-process-exec-error.js @@ -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')); })); }