diff --git a/benchmark/url/url-searchparams-iteration.js b/benchmark/url/url-searchparams-iteration.js index caa4e45c41..833271ef30 100644 --- a/benchmark/url/url-searchparams-iteration.js +++ b/benchmark/url/url-searchparams-iteration.js @@ -1,7 +1,7 @@ 'use strict'; const common = require('../common.js'); const assert = require('assert'); -const URLSearchParams = new (require('url').URL)('a:').searchParams.constructor; +const { URLSearchParams } = require('url'); const bench = common.createBenchmark(main, { method: ['forEach', 'iterator'], diff --git a/benchmark/url/url-searchparams-parse.js b/benchmark/url/url-searchparams-parse.js index 61796a7d32..c156e452e1 100644 --- a/benchmark/url/url-searchparams-parse.js +++ b/benchmark/url/url-searchparams-parse.js @@ -1,6 +1,6 @@ 'use strict'; const common = require('../common.js'); -const URLSearchParams = new (require('url').URL)('a:').searchParams.constructor; +const { URLSearchParams } = require('url'); const inputs = { noencode: 'foo=bar&baz=quux&xyzzy=thud', diff --git a/benchmark/url/url-searchparams-read.js b/benchmark/url/url-searchparams-read.js index 4cee49c74d..94ddaf1cfa 100644 --- a/benchmark/url/url-searchparams-read.js +++ b/benchmark/url/url-searchparams-read.js @@ -1,6 +1,6 @@ 'use strict'; const common = require('../common.js'); -const URLSearchParams = new (require('url').URL)('a:').searchParams.constructor; +const { URLSearchParams } = require('url'); const bench = common.createBenchmark(main, { method: ['get', 'getAll', 'has'], diff --git a/benchmark/url/url-searchparams-stringifier.js b/benchmark/url/url-searchparams-stringifier.js index 2979064b32..1a2f677727 100644 --- a/benchmark/url/url-searchparams-stringifier.js +++ b/benchmark/url/url-searchparams-stringifier.js @@ -1,7 +1,7 @@ 'use strict'; const common = require('../common.js'); const Buffer = require('buffer').Buffer; -const URLSearchParams = new (require('url').URL)('a:').searchParams.constructor; +const { URLSearchParams } = require('url'); const inputs = { noencode: 'foo=bar&baz=quux&xyzzy=thud',