diff --git a/benchmarks/fetch/isomorphic-encode.mjs b/benchmarks/fetch/isomorphic-encode.mjs index e41becf6566..818d8ccc2dc 100644 --- a/benchmarks/fetch/isomorphic-encode.mjs +++ b/benchmarks/fetch/isomorphic-encode.mjs @@ -28,10 +28,6 @@ function isomorphicEncode1 (input) { return input } -/** - * @see https://infra.spec.whatwg.org/#isomorphic-encode - * @param {string} input - */ function isomorphicEncode2 (input) { // 1. Assert: input contains no code points greater than U+00FF. if (invalidIsomorphicEncodeValueRegex.test(input)) { @@ -44,12 +40,13 @@ function isomorphicEncode2 (input) { } const settings = { - small: `${generateAsciiString(10)}`, - middle: `${generateAsciiString(30)}`, - long: `${generateAsciiString(70)}` + small: 10, + middle: 30, + long: 70 } -for (const [runName, value] of Object.entries(settings)) { +for (const [runName, length] of Object.entries(settings)) { + const value = generateAsciiString(length) [ { name: `${runName} (valid)`, value }, {