diff --git a/test/parallel/test-assert.js b/test/parallel/test-assert.js index 8cba5ed517aa16..ff2c3f1e3f2d37 100644 --- a/test/parallel/test-assert.js +++ b/test/parallel/test-assert.js @@ -378,7 +378,8 @@ try { assert.strictEqual(true, threw, 'a.doesNotThrow is not catching type matching errors'); -assert.throws(function() { assert.ifError(new Error('test error')); }); +assert.throws(function() { assert.ifError(new Error('test error')); }, + /^Error: test error$/); assert.doesNotThrow(function() { assert.ifError(null); }); assert.doesNotThrow(function() { assert.ifError(); });