From 5d7016eda81281d5a7833cf943c23d4321b0e764 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Sun, 23 Jul 2023 22:55:18 +0200 Subject: [PATCH] url: ensure getter access do not mutate observable symbols --- test/parallel/test-whatwg-url-custom-searchparams.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/parallel/test-whatwg-url-custom-searchparams.js b/test/parallel/test-whatwg-url-custom-searchparams.js index 0b2087ac246313..75fa1779bdeb45 100644 --- a/test/parallel/test-whatwg-url-custom-searchparams.js +++ b/test/parallel/test-whatwg-url-custom-searchparams.js @@ -16,7 +16,9 @@ const normalizedValues = ['a', '1', 'true', 'undefined', 'null', '\uFFFD', '[object Object]']; const m = new URL('http://example.org'); +const ownSymbolsBeforeGetterAccess = Object.getOwnPropertySymbols(m); const sp = m.searchParams; +assert.deepStrictEqual(Object.getOwnPropertySymbols(m), ownSymbolsBeforeGetterAccess); assert(sp); assert.strictEqual(sp.toString(), '');