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