mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 02:48:24 +00:00
fix: inspecting prototypes of built-ins with custom inspect implementations should not throw (#11308)
This commit is contained in:
parent
5e092b19fe
commit
5fa58c9216
14 changed files with 325 additions and 123 deletions
10
cli/tests/unit/dom_exception_test.ts
Normal file
10
cli/tests/unit/dom_exception_test.ts
Normal file
|
@ -0,0 +1,10 @@
|
|||
import { assertEquals, assertStringIncludes, unitTest } from "./test_util.ts";
|
||||
|
||||
unitTest(function customInspectFunction(): void {
|
||||
const blob = new DOMException("test");
|
||||
assertEquals(
|
||||
Deno.inspect(blob),
|
||||
`DOMException: test`,
|
||||
);
|
||||
assertStringIncludes(Deno.inspect(DOMException.prototype), "DOMException");
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue