From 5fa58c92165e23386b8ed3c3079103997fe1bef9 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Thu, 8 Jul 2021 09:43:36 -0400 Subject: fix: inspecting prototypes of built-ins with custom inspect implementations should not throw (#11308) --- cli/tests/unit/response_test.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'cli/tests/unit/response_test.ts') diff --git a/cli/tests/unit/response_test.ts b/cli/tests/unit/response_test.ts index 7e444fd83..1faf8991a 100644 --- a/cli/tests/unit/response_test.ts +++ b/cli/tests/unit/response_test.ts @@ -1,5 +1,10 @@ // Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -import { assert, assertEquals, unitTest } from "./test_util.ts"; +import { + assert, + assertEquals, + assertStringIncludes, + unitTest, +} from "./test_util.ts"; unitTest(async function responseText() { const response = new Response("hello world"); @@ -67,4 +72,5 @@ unitTest(function customInspectFunction(): void { url: "" }`, ); + assertStringIncludes(Deno.inspect(Response.prototype), "Response"); }); -- cgit v1.2.3