diff options
Diffstat (limited to 'test/parallel/test-whatwg-url-searchparams-has.js')
-rw-r--r-- | test/parallel/test-whatwg-url-searchparams-has.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/parallel/test-whatwg-url-searchparams-has.js b/test/parallel/test-whatwg-url-searchparams-has.js index dcdf585dcd..47c6b6f7ba 100644 --- a/test/parallel/test-whatwg-url-searchparams-has.js +++ b/test/parallel/test-whatwg-url-searchparams-has.js @@ -40,20 +40,20 @@ test(function() { // Tests below are not from WPT. { const params = new URLSearchParams(); - assert.throws(() => { + common.expectsError(() => { params.has.call(undefined); - }, common.expectsError({ + }, { code: 'ERR_INVALID_THIS', type: TypeError, message: 'Value of "this" must be of type URLSearchParams' - })); - assert.throws(() => { + }); + common.expectsError(() => { params.has(); - }, common.expectsError({ + }, { code: 'ERR_MISSING_ARGS', type: TypeError, message: 'The "name" argument must be specified' - })); + }); const obj = { toString() { throw new Error('toString'); }, |