diff --git a/lib/internal/webstreams/queuingstrategies.js b/lib/internal/webstreams/queuingstrategies.js index 78cec0c35559d3..9579bed830f1e3 100644 --- a/lib/internal/webstreams/queuingstrategies.js +++ b/lib/internal/webstreams/queuingstrategies.js @@ -2,6 +2,7 @@ const { ObjectDefineProperties, + ObjectDefineProperty, SymbolToStringTag, } = primordials; @@ -47,11 +48,12 @@ const isCountQueuingStrategy = * }} QueuingStrategy */ -// eslint-disable-next-line func-name-matching,func-style -const byteSizeFunction = function size(chunk) { return chunk.byteLength; }; +const byteSizeFunction = (chunk) => { return chunk.byteLength; }; +const countSizeFunction = () => { return 1; }; -// eslint-disable-next-line func-name-matching,func-style -const countSizeFunction = function size() { return 1; }; +for (const fn of [byteSizeFunction, countSizeFunction]) { + ObjectDefineProperty(fn, 'name', { __proto__: null, value: 'size' }); +} /** * @type {QueuingStrategy} diff --git a/test/wpt/status/streams.json b/test/wpt/status/streams.json index 166bcf869080d2..9899c581d9f96e 100644 --- a/test/wpt/status/streams.json +++ b/test/wpt/status/streams.json @@ -2,16 +2,6 @@ "queuing-strategies-size-function-per-global.window.js": { "skip": "Browser-specific test" }, - "queuing-strategies.any.js": { - "fail": { - "expected": [ - "CountQueuingStrategy: size should not have a prototype property", - "ByteLengthQueuingStrategy: size should not have a prototype property", - "CountQueuingStrategy: size should not be a constructor", - "ByteLengthQueuingStrategy: size should not be a constructor" - ] - } - }, "readable-streams/cross-realm-crash.window.js": { "skip": "Browser-specific test" },