From 25fcfe5d79850b6969f2756415fc01e2234850c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 7 May 2024 22:02:29 +0100 Subject: fix: DOMException doesn't throw on __callSitesEvals (#23729) --- tests/unit/dom_exception_test.ts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/unit/dom_exception_test.ts') diff --git a/tests/unit/dom_exception_test.ts b/tests/unit/dom_exception_test.ts index de335e105..806248caa 100644 --- a/tests/unit/dom_exception_test.ts +++ b/tests/unit/dom_exception_test.ts @@ -1,6 +1,7 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { + assert, assertEquals, assertNotEquals, assertStringIncludes, @@ -21,3 +22,9 @@ Deno.test(function nameToCodeMappingPrototypeAccess() { assertNotEquals(newCode, new DOMException("test", "pollution").code); Reflect.deleteProperty(objectPrototype, "pollution"); }); + +Deno.test(function callSitesEvalsDoesntThrow() { + const e2 = new DOMException("asdf"); + // @ts-ignore no types for `__callSiteEvals` but it's observable. + assert(Array.isArray(e2.__callSiteEvals)); +}); -- cgit v1.2.3