From b2109a12aa84b5006616a3e82cb26acf53c23e81 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Tue, 14 Jun 2022 19:25:58 -0400 Subject: fix(url): properly indent when inspecting URLs (#14867) This commit updates the custom inspect function for URL objects to pass the inspect options through so that the context is propagated and the resulting indentation is correct. Fixes: https://github.com/denoland/deno/issues/14171 --- cli/tests/testdata/custom_inspect_url.js | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 cli/tests/testdata/custom_inspect_url.js (limited to 'cli/tests/testdata/custom_inspect_url.js') diff --git a/cli/tests/testdata/custom_inspect_url.js b/cli/tests/testdata/custom_inspect_url.js new file mode 100644 index 000000000..69aa2dc49 --- /dev/null +++ b/cli/tests/testdata/custom_inspect_url.js @@ -0,0 +1,3 @@ +console.log([new URL("https://example.com/path")]); +console.log({ url: new URL("https://example.com/path") }); +console.log({ url: [new URL("https://example.com/path")] }); -- cgit v1.2.3