summaryrefslogtreecommitdiff
path: root/std/testing/asserts.ts
diff options
context:
space:
mode:
authorPig Fang <g-plane@hotmail.com>2020-09-16 18:42:51 +0800
committerGitHub <noreply@github.com>2020-09-16 12:42:51 +0200
commitaa657d6493cb0f36a5e2aa29e6352c9a9991ad2b (patch)
treee200264ee0ef29c12da0d584994899d9623e3fb1 /std/testing/asserts.ts
parentaa81bc73d96729f6593d55d2c1e66000e115dfe4 (diff)
fix(std/testing): assertion diff color (#7499)
Diffstat (limited to 'std/testing/asserts.ts')
-rw-r--r--std/testing/asserts.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/std/testing/asserts.ts b/std/testing/asserts.ts
index b7377c1bc..a3f0c1338 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 {
let string = globalThis.Deno
- ? Deno.inspect(v, {
+ ? stripColor(Deno.inspect(v, {
depth: Infinity,
sorted: true,
trailingComma: true,
compact: false,
iterableLimit: Infinity,
- })
+ }))
: String(v);
if (typeof v == "string") {
string = `"${string.replace(/(?=["\\])/g, "\\")}"`;
@@ -303,7 +303,7 @@ export function assertStrictEquals(
}
/**
- * Make an assertion that `actual` and `expected` are not strictly equal.
+ * Make an assertion that `actual` and `expected` are not strictly equal.
* If the values are strictly equal then throw.
* ```ts
* assertNotStrictEquals(1, 1)