From 27ee4b255107d8e074c06b57927b7349f4edd044 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Wed, 30 Sep 2020 03:59:50 +0100 Subject: feat(cli/console): Add Deno.InspectOptions::colors (#7742) Ref: https://github.com/denoland/deno/pull/7516#pullrequestreview-489567120 --- std/testing/asserts.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'std/testing') diff --git a/std/testing/asserts.ts b/std/testing/asserts.ts index 05bb995ab..889a622fd 100644 --- a/std/testing/asserts.ts +++ b/std/testing/asserts.ts @@ -21,13 +21,13 @@ export class AssertionError extends Error { export function _format(v: unknown): string { return globalThis.Deno - ? stripColor(Deno.inspect(v, { + ? Deno.inspect(v, { depth: Infinity, sorted: true, trailingComma: true, compact: false, iterableLimit: Infinity, - })) + }) : `"${String(v).replace(/(?=["\\])/g, "\\")}"`; } -- cgit v1.2.3