From 182ce97f3bfaf351d2c64a5f65415b2b68443b75 Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Thu, 19 Jan 2017 18:02:35 -0800 Subject: [PATCH] More specific error message tests --- test/parallel/test-whatwg-url-searchparams.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-whatwg-url-searchparams.js b/test/parallel/test-whatwg-url-searchparams.js index e6bba03bb7768d..a5d8b2f595a54b 100644 --- a/test/parallel/test-whatwg-url-searchparams.js +++ b/test/parallel/test-whatwg-url-searchparams.js @@ -54,8 +54,10 @@ sp.forEach(function(val, key, obj) { sp.forEach(function() { assert.strictEqual(this, m); }, m); -assert.throws(() => sp.forEach(), TypeError); -assert.throws(() => sp.forEach(1), TypeError); +assert.throws(() => sp.forEach(), + /^TypeError: The `callback` argument needs to be specified$/); +assert.throws(() => sp.forEach(1), + /^TypeError: The `callback` argument must be a function$/); m.search = '?a=a&b=b'; assert.strictEqual(sp.toString(), 'a=a&b=b');