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')); })); }