fix: inspecting prototypes of built-ins with custom inspect implementations should not throw (#11308)

This commit is contained in:
David Sherret 2021-07-08 09:43:36 -04:00 committed by GitHub
parent 5e092b19fe
commit 5fa58c9216
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 325 additions and 123 deletions

View 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");
});