diff options
author | Kenta Moriuchi <moriken@kimamass.com> | 2023-03-01 08:14:16 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-01 08:14:16 +0900 |
commit | 55833cf799979e63c6b027fbbf018272308caf5c (patch) | |
tree | cc0ae9aa9116e6296e5e74e1c926cfd94fa26449 /cli/tests/unit/console_test.ts | |
parent | 6ffbf8a9410f5ea41669efdece60f7f47f77e3c7 (diff) |
fix(core): introduce `SafeRegExp` to primordials (#17592)
Diffstat (limited to 'cli/tests/unit/console_test.ts')
-rw-r--r-- | cli/tests/unit/console_test.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cli/tests/unit/console_test.ts b/cli/tests/unit/console_test.ts index 239a8bf26..2b7426b99 100644 --- a/cli/tests/unit/console_test.ts +++ b/cli/tests/unit/console_test.ts @@ -2138,6 +2138,18 @@ Deno.test(async function inspectAggregateError() { } }); +Deno.test(function inspectWithPrototypePollution() { + const originalExec = RegExp.prototype.exec; + try { + RegExp.prototype.exec = () => { + throw Error(); + }; + Deno.inspect("foo"); + } finally { + RegExp.prototype.exec = originalExec; + } +}); + Deno.test(function inspectorMethods() { console.timeStamp("test"); console.profile("test"); |