diff options
Diffstat (limited to 'cli/tests/unit/flash_test.ts')
-rw-r--r-- | cli/tests/unit/flash_test.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cli/tests/unit/flash_test.ts b/cli/tests/unit/flash_test.ts index ebee7a024..d32e0a54f 100644 --- a/cli/tests/unit/flash_test.ts +++ b/cli/tests/unit/flash_test.ts @@ -2272,10 +2272,11 @@ Deno.test( Deno.test( { permissions: { net: true } }, - async function serveWithPromisePrototypeThenOverride() { + async function serveWithPrototypePollution() { const originalThen = Promise.prototype.then; + const originalSymbolIterator = Array.prototype[Symbol.iterator]; try { - Promise.prototype.then = () => { + Promise.prototype.then = Array.prototype[Symbol.iterator] = () => { throw new Error(); }; const ac = new AbortController(); @@ -2292,6 +2293,7 @@ Deno.test( await server; } finally { Promise.prototype.then = originalThen; + Array.prototype[Symbol.iterator] = originalSymbolIterator; } }, ); |