From b40937745e8695d9f8e5a83a3281f48c6ad247a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bala=CC=81zs=20Schwarzkopf?= Date: Wed, 19 Aug 2020 15:37:59 +0200 Subject: [PATCH 1/9] feat(std/node/assert): add `ok()` ref: denoland/deno#7102 --- std/node/assert.ts | 2 +- std/node/assert_test.ts | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 std/node/assert_test.ts diff --git a/std/node/assert.ts b/std/node/assert.ts index 97721211f3e43b..f14a2f63db7687 100644 --- a/std/node/assert.ts +++ b/std/node/assert.ts @@ -6,7 +6,7 @@ import { assertThrows, } from "../testing/asserts.ts"; -export { assert, fail } from "../testing/asserts.ts"; +export { assert as ok, assert, fail } from "../testing/asserts.ts"; export const equal = assertEquals; export const notEqual = assertNotEquals; diff --git a/std/node/assert_test.ts b/std/node/assert_test.ts new file mode 100644 index 00000000000000..6d79d3a8db11ef --- /dev/null +++ b/std/node/assert_test.ts @@ -0,0 +1,27 @@ +import { + assert as denoAssert, + assertEquals, + assertNotEquals, + assertStrictEquals, + assertMatch, + assertThrows +} from "../testing/asserts.ts"; + +import { + ok, + assert, + equal, + notEqual, + strictEqual, + match, + throws +} from './assert.ts'; + +assertStrictEquals(assert, denoAssert, '`assert()` should be exposed'); +// ref: https://nodejs.org/dist/latest-v14.x/docs/api/assert.html#assert_assert_value_message +assertStrictEquals(assert, ok, '`assert()` should be an alias of `ok()`'); +assertStrictEquals(assertEquals, equal, '`assertEquals()` should be exposed as `equal()`'); +assertStrictEquals(assertNotEquals, notEqual, '`assertNotEquals()` should be exposed as `notEqual()`'); +assertStrictEquals(assertStrictEquals, strictEqual, '`assertStrictEquals()` should be exposed as `strictEqual()`'); +assertStrictEquals(assertMatch, match, '`assertMatch()` should be exposed as `match()`'); +assertStrictEquals(assertThrows, throws, '`assertThrows()` should be exposed as `throws()`'); From 5f77b58fc4c504289a791f1af9f6c5a69416d122 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bala=CC=81zs=20Schwarzkopf?= Date: Wed, 19 Aug 2020 15:42:34 +0200 Subject: [PATCH 2/9] test(std/node/assert): ensure that `fail()` is exposed --- std/node/assert_test.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/std/node/assert_test.ts b/std/node/assert_test.ts index 6d79d3a8db11ef..6c7e34c6e876ac 100644 --- a/std/node/assert_test.ts +++ b/std/node/assert_test.ts @@ -4,7 +4,8 @@ import { assertNotEquals, assertStrictEquals, assertMatch, - assertThrows + assertThrows, + fail as denoFail } from "../testing/asserts.ts"; import { @@ -14,7 +15,8 @@ import { notEqual, strictEqual, match, - throws + throws, + fail } from './assert.ts'; assertStrictEquals(assert, denoAssert, '`assert()` should be exposed'); @@ -25,3 +27,4 @@ assertStrictEquals(assertNotEquals, notEqual, '`assertNotEquals()` should be exp assertStrictEquals(assertStrictEquals, strictEqual, '`assertStrictEquals()` should be exposed as `strictEqual()`'); assertStrictEquals(assertMatch, match, '`assertMatch()` should be exposed as `match()`'); assertStrictEquals(assertThrows, throws, '`assertThrows()` should be exposed as `throws()`'); +assertStrictEquals(fail, denoFail, '`fail()` should be exposed'); From beddeb0d8fb749ff59ff95ad6b23bb6c7f8a3bdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bala=CC=81zs=20Schwarzkopf?= Date: Wed, 19 Aug 2020 17:44:04 +0200 Subject: [PATCH 3/9] feat(std/testing/asserts): implement `assertNotStrictEquals()` --- std/testing/asserts.ts | 57 +++++++++++++++++++++++++++++++++++-- std/testing/asserts_test.ts | 32 ++++++++++++++++++++- 2 files changed, 85 insertions(+), 4 deletions(-) diff --git a/std/testing/asserts.ts b/std/testing/asserts.ts index 4b9241e55cfb22..042f736fabb4b5 100644 --- a/std/testing/asserts.ts +++ b/std/testing/asserts.ts @@ -242,9 +242,15 @@ export function assertNotEquals( * assertStrictEquals(1, 2) * ``` */ -export function assertStrictEquals( - actual: T, - expected: T, +export function assertStrictEquals( + actual: unknown, + expected: unknown, + msg?: string, +): void; +export function assertStrictEquals(actual: T, expected: T, msg?: string): void; +export function assertStrictEquals( + actual: unknown, + expected: unknown, msg?: string, ): void { if (actual === expected) { @@ -285,6 +291,51 @@ export function assertStrictEquals( throw new AssertionError(message); } +/** + * Make an assertion that `actual` and `expected` are not strictly equal. + * If the values are strictly equal then throw. + * ```ts + * assertNotStrictEquals(1, 1) + * ``` + */ +export function assertNotStrictEquals( + actual: unknown, + expected: unknown, + msg?: string, +): void; +export function assertNotStrictEquals(actual: T, expected: T, msg?: string): void; +export function assertNotStrictEquals( + actual: unknown, + expected: unknown, + msg?: string, +): void { + if (actual !== expected) { + return; + } + + let message: string; + + if (msg) { + message = msg; + } else { + const actualString = _format(actual); + const expectedString = _format(expected); + + try { + const diffResult = diff( + actualString.split("\n"), + expectedString.split("\n"), + ); + const diffMsg = buildMessage(diffResult).join("\n"); + message = `Expected "actual" to be strictly unequal to:\n${diffMsg}`; + } catch (e) { + message = `\n${red(CAN_NOT_DISPLAY)} + \n\n`; + } + } + + throw new AssertionError(message); +} + /** * Make an assertion that actual contains expected. If not * then thrown. diff --git a/std/testing/asserts_test.ts b/std/testing/asserts_test.ts index 7ea73b5c0493f7..017f096ba54455 100644 --- a/std/testing/asserts_test.ts +++ b/std/testing/asserts_test.ts @@ -8,6 +8,7 @@ import { assertMatch, assertEquals, assertStrictEquals, + assertNotStrictEquals, assertThrows, assertThrowsAsync, AssertionError, @@ -463,13 +464,42 @@ Deno.test({ }); Deno.test({ - name: "assert* functions with specified type paratemeter", + name: 'strictly unequal pass case', + fn(): void { + assertNotStrictEquals(true, false); + assertNotStrictEquals(10, 11); + assertNotStrictEquals('abc', 'xyz'); + assertNotStrictEquals(1, "1"); + + const xs = [1, false, 'foo']; + const ys = [1, true, 'bar']; + assertNotStrictEquals(xs, ys); + + const x = { a: 1 }; + const y = { a: 2 }; + assertNotStrictEquals(x, y); + } +}); + +Deno.test({ + name: 'strictly unequal fail case', + fn(): void { + assertThrows( + () => assertNotStrictEquals(1, 1), + AssertionError + ) + } +}); + +Deno.test({ + name: "assert* functions with specified type parameter", fn(): void { assertEquals("hello", "hello"); assertNotEquals(1, 2); assertArrayContains([true, false], [true]); const value = { x: 1 }; assertStrictEquals(value, value); + assertNotStrictEquals(1, '1' as any); }, }); From 1fc6926772eaba65968f12cb674a81c61505a1ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bala=CC=81zs=20Schwarzkopf?= Date: Wed, 19 Aug 2020 17:53:17 +0200 Subject: [PATCH 4/9] refactor(std/testing/asserts): remove useless diffing code from `assertNotStrictEquals()` --- std/testing/asserts.ts | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/std/testing/asserts.ts b/std/testing/asserts.ts index 042f736fabb4b5..127019cd6bbed1 100644 --- a/std/testing/asserts.ts +++ b/std/testing/asserts.ts @@ -313,27 +313,9 @@ export function assertNotStrictEquals( return; } - let message: string; - - if (msg) { - message = msg; - } else { - const actualString = _format(actual); - const expectedString = _format(expected); - - try { - const diffResult = diff( - actualString.split("\n"), - expectedString.split("\n"), - ); - const diffMsg = buildMessage(diffResult).join("\n"); - message = `Expected "actual" to be strictly unequal to:\n${diffMsg}`; - } catch (e) { - message = `\n${red(CAN_NOT_DISPLAY)} + \n\n`; - } - } - - throw new AssertionError(message); + throw new AssertionError( + msg ?? `Expected "actual" to be strictly unequal to: ${_format(actual)}\n` + ); } /** From 4f49ddde7b08d3311610ea0195a84736f1cca55d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bala=CC=81zs=20Schwarzkopf?= Date: Wed, 19 Aug 2020 18:17:58 +0200 Subject: [PATCH 5/9] fix(std/node/assert): rename exports to match their expected behaviour based on corresponding Node.js docs The incorrectly referred (misnamed) methods are deprecated anyway. Ref: https://nodejs.org/dist/latest-v14.x/docs/api/assert.html Closes denoland/deno#7102 --- std/node/assert.ts | 4 ++-- std/node/assert_test.ts | 23 ++++++++++++----------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/std/node/assert.ts b/std/node/assert.ts index f14a2f63db7687..0ee8f2f4bedc0b 100644 --- a/std/node/assert.ts +++ b/std/node/assert.ts @@ -8,8 +8,8 @@ import { export { assert as ok, assert, fail } from "../testing/asserts.ts"; -export const equal = assertEquals; -export const notEqual = assertNotEquals; +export const deepStrictEqual = assertEquals; +export const notDeepStrictEqual = assertNotEquals; export const strictEqual = assertStrictEquals; export const match = assertMatch; export const throws = assertThrows; diff --git a/std/node/assert_test.ts b/std/node/assert_test.ts index 6c7e34c6e876ac..5c9ae95cb88faa 100644 --- a/std/node/assert_test.ts +++ b/std/node/assert_test.ts @@ -11,20 +11,21 @@ import { import { ok, assert, - equal, - notEqual, + deepStrictEqual, + notDeepStrictEqual, strictEqual, match, throws, fail } from './assert.ts'; -assertStrictEquals(assert, denoAssert, '`assert()` should be exposed'); -// ref: https://nodejs.org/dist/latest-v14.x/docs/api/assert.html#assert_assert_value_message -assertStrictEquals(assert, ok, '`assert()` should be an alias of `ok()`'); -assertStrictEquals(assertEquals, equal, '`assertEquals()` should be exposed as `equal()`'); -assertStrictEquals(assertNotEquals, notEqual, '`assertNotEquals()` should be exposed as `notEqual()`'); -assertStrictEquals(assertStrictEquals, strictEqual, '`assertStrictEquals()` should be exposed as `strictEqual()`'); -assertStrictEquals(assertMatch, match, '`assertMatch()` should be exposed as `match()`'); -assertStrictEquals(assertThrows, throws, '`assertThrows()` should be exposed as `throws()`'); -assertStrictEquals(fail, denoFail, '`fail()` should be exposed'); +Deno.test('API should be exposed', () => { + assertStrictEquals(assert, denoAssert, '`assert()` should be exposed'); + assertStrictEquals(assert, ok, '`assert()` should be an alias of `ok()`'); + assertStrictEquals(assertEquals, deepStrictEqual, '`assertEquals()` should be exposed as `deepStrictEqual()`'); + assertStrictEquals(assertNotEquals, notDeepStrictEqual, '`assertNotEquals()` should be exposed as `notDeepStrictEqual()`'); + assertStrictEquals(assertStrictEquals, strictEqual, '`assertStrictEquals()` should be exposed as `strictEqual()`'); + assertStrictEquals(assertMatch, match, '`assertMatch()` should be exposed as `match()`'); + assertStrictEquals(assertThrows, throws, '`assertThrows()` should be exposed as `throws()`'); + assertStrictEquals(fail, denoFail, '`fail()` should be exposed'); +}); From d29643d697da15df864d9aacf1314680bf4783e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bala=CC=81zs=20Schwarzkopf?= Date: Wed, 19 Aug 2020 18:19:46 +0200 Subject: [PATCH 6/9] feat(std/node/assert): add `notStrictEqual()` --- std/node/assert.ts | 2 ++ std/node/assert_test.ts | 3 +++ 2 files changed, 5 insertions(+) diff --git a/std/node/assert.ts b/std/node/assert.ts index 0ee8f2f4bedc0b..d412a79117787e 100644 --- a/std/node/assert.ts +++ b/std/node/assert.ts @@ -2,6 +2,7 @@ import { assertEquals, assertNotEquals, assertStrictEquals, + assertNotStrictEquals, assertMatch, assertThrows, } from "../testing/asserts.ts"; @@ -11,5 +12,6 @@ export { assert as ok, assert, fail } from "../testing/asserts.ts"; export const deepStrictEqual = assertEquals; export const notDeepStrictEqual = assertNotEquals; export const strictEqual = assertStrictEquals; +export const notStrictEqual = assertNotStrictEquals; export const match = assertMatch; export const throws = assertThrows; diff --git a/std/node/assert_test.ts b/std/node/assert_test.ts index 5c9ae95cb88faa..e3cc74da3f07f2 100644 --- a/std/node/assert_test.ts +++ b/std/node/assert_test.ts @@ -3,6 +3,7 @@ import { assertEquals, assertNotEquals, assertStrictEquals, + assertNotStrictEquals, assertMatch, assertThrows, fail as denoFail @@ -14,6 +15,7 @@ import { deepStrictEqual, notDeepStrictEqual, strictEqual, + notStrictEqual, match, throws, fail @@ -25,6 +27,7 @@ Deno.test('API should be exposed', () => { assertStrictEquals(assertEquals, deepStrictEqual, '`assertEquals()` should be exposed as `deepStrictEqual()`'); assertStrictEquals(assertNotEquals, notDeepStrictEqual, '`assertNotEquals()` should be exposed as `notDeepStrictEqual()`'); assertStrictEquals(assertStrictEquals, strictEqual, '`assertStrictEquals()` should be exposed as `strictEqual()`'); + assertStrictEquals(assertNotStrictEquals, notStrictEqual, '`assertNotStrictEquals()` should be exposed as `notStrictEqual()`'); assertStrictEquals(assertMatch, match, '`assertMatch()` should be exposed as `match()`'); assertStrictEquals(assertThrows, throws, '`assertThrows()` should be exposed as `throws()`'); assertStrictEquals(fail, denoFail, '`fail()` should be exposed'); From a46e1507e42943e84c9a892e01134a4d992618c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bala=CC=81zs=20Schwarzkopf?= Date: Wed, 19 Aug 2020 18:46:01 +0200 Subject: [PATCH 7/9] refactor(std/node/assert): make `assert()` the default export --- std/node/assert.ts | 7 ++++++- std/node/assert_test.ts | 9 ++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/std/node/assert.ts b/std/node/assert.ts index d412a79117787e..393fdac020f52c 100644 --- a/std/node/assert.ts +++ b/std/node/assert.ts @@ -7,7 +7,12 @@ import { assertThrows, } from "../testing/asserts.ts"; -export { assert as ok, assert, fail } from "../testing/asserts.ts"; +export { + assert as default, + assert as ok, + assert, + fail +} from "../testing/asserts.ts"; export const deepStrictEqual = assertEquals; export const notDeepStrictEqual = assertNotEquals; diff --git a/std/node/assert_test.ts b/std/node/assert_test.ts index e3cc74da3f07f2..9c3e887e65fa31 100644 --- a/std/node/assert_test.ts +++ b/std/node/assert_test.ts @@ -9,9 +9,11 @@ import { fail as denoFail } from "../testing/asserts.ts"; +import assert from "./assert.ts"; + import { ok, - assert, + assert as assert_, deepStrictEqual, notDeepStrictEqual, strictEqual, @@ -22,8 +24,9 @@ import { } from './assert.ts'; Deno.test('API should be exposed', () => { - assertStrictEquals(assert, denoAssert, '`assert()` should be exposed'); - assertStrictEquals(assert, ok, '`assert()` should be an alias of `ok()`'); + assertStrictEquals(assert_, assert, '`assert()` should be the default export'); + assertStrictEquals(assert_, denoAssert, '`assert()` should be exposed'); + assertStrictEquals(assert_, ok, '`assert()` should be an alias of `ok()`'); assertStrictEquals(assertEquals, deepStrictEqual, '`assertEquals()` should be exposed as `deepStrictEqual()`'); assertStrictEquals(assertNotEquals, notDeepStrictEqual, '`assertNotEquals()` should be exposed as `notDeepStrictEqual()`'); assertStrictEquals(assertStrictEquals, strictEqual, '`assertStrictEquals()` should be exposed as `strictEqual()`'); From c141ada76ff0f39cc58111ebb82318dfb23429eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bala=CC=81zs=20Schwarzkopf?= Date: Wed, 19 Aug 2020 19:30:02 +0200 Subject: [PATCH 8/9] test(std/testing/asserts): don't use explicit any --- std/testing/asserts_test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/std/testing/asserts_test.ts b/std/testing/asserts_test.ts index 017f096ba54455..23d89aa87799d7 100644 --- a/std/testing/asserts_test.ts +++ b/std/testing/asserts_test.ts @@ -499,7 +499,7 @@ Deno.test({ assertArrayContains([true, false], [true]); const value = { x: 1 }; assertStrictEquals(value, value); - assertNotStrictEquals(1, '1' as any); + assertNotStrictEquals(value, { x: 1 }); }, }); From a14023d1dd69f09a0a3ab39e280a8cf8c197a81c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bala=CC=81zs=20Schwarzkopf?= Date: Wed, 19 Aug 2020 19:39:58 +0200 Subject: [PATCH 9/9] chore(std/node/assert): format source files correctly --- std/node/assert.ts | 10 +++---- std/node/assert_test.ts | 60 +++++++++++++++++++++++++++---------- std/testing/asserts.ts | 14 +++++++-- std/testing/asserts_test.ts | 18 +++++------ 4 files changed, 69 insertions(+), 33 deletions(-) diff --git a/std/node/assert.ts b/std/node/assert.ts index 393fdac020f52c..3d738cbbf3010b 100644 --- a/std/node/assert.ts +++ b/std/node/assert.ts @@ -7,11 +7,11 @@ import { assertThrows, } from "../testing/asserts.ts"; -export { - assert as default, - assert as ok, - assert, - fail +export { + assert as default, + assert as ok, + assert, + fail, } from "../testing/asserts.ts"; export const deepStrictEqual = assertEquals; diff --git a/std/node/assert_test.ts b/std/node/assert_test.ts index 9c3e887e65fa31..8df13187bbd558 100644 --- a/std/node/assert_test.ts +++ b/std/node/assert_test.ts @@ -6,32 +6,60 @@ import { assertNotStrictEquals, assertMatch, assertThrows, - fail as denoFail + fail as denoFail, } from "../testing/asserts.ts"; import assert from "./assert.ts"; -import { +import { ok, - assert as assert_, + assert as assert_, deepStrictEqual, notDeepStrictEqual, strictEqual, notStrictEqual, match, throws, - fail -} from './assert.ts'; + fail, +} from "./assert.ts"; -Deno.test('API should be exposed', () => { - assertStrictEquals(assert_, assert, '`assert()` should be the default export'); - assertStrictEquals(assert_, denoAssert, '`assert()` should be exposed'); - assertStrictEquals(assert_, ok, '`assert()` should be an alias of `ok()`'); - assertStrictEquals(assertEquals, deepStrictEqual, '`assertEquals()` should be exposed as `deepStrictEqual()`'); - assertStrictEquals(assertNotEquals, notDeepStrictEqual, '`assertNotEquals()` should be exposed as `notDeepStrictEqual()`'); - assertStrictEquals(assertStrictEquals, strictEqual, '`assertStrictEquals()` should be exposed as `strictEqual()`'); - assertStrictEquals(assertNotStrictEquals, notStrictEqual, '`assertNotStrictEquals()` should be exposed as `notStrictEqual()`'); - assertStrictEquals(assertMatch, match, '`assertMatch()` should be exposed as `match()`'); - assertStrictEquals(assertThrows, throws, '`assertThrows()` should be exposed as `throws()`'); - assertStrictEquals(fail, denoFail, '`fail()` should be exposed'); +Deno.test("API should be exposed", () => { + assertStrictEquals( + assert_, + assert, + "`assert()` should be the default export", + ); + assertStrictEquals(assert_, denoAssert, "`assert()` should be exposed"); + assertStrictEquals(assert_, ok, "`assert()` should be an alias of `ok()`"); + assertStrictEquals( + assertEquals, + deepStrictEqual, + "`assertEquals()` should be exposed as `deepStrictEqual()`", + ); + assertStrictEquals( + assertNotEquals, + notDeepStrictEqual, + "`assertNotEquals()` should be exposed as `notDeepStrictEqual()`", + ); + assertStrictEquals( + assertStrictEquals, + strictEqual, + "`assertStrictEquals()` should be exposed as `strictEqual()`", + ); + assertStrictEquals( + assertNotStrictEquals, + notStrictEqual, + "`assertNotStrictEquals()` should be exposed as `notStrictEqual()`", + ); + assertStrictEquals( + assertMatch, + match, + "`assertMatch()` should be exposed as `match()`", + ); + assertStrictEquals( + assertThrows, + throws, + "`assertThrows()` should be exposed as `throws()`", + ); + assertStrictEquals(fail, denoFail, "`fail()` should be exposed"); }); diff --git a/std/testing/asserts.ts b/std/testing/asserts.ts index 127019cd6bbed1..fe8b90f63243fd 100644 --- a/std/testing/asserts.ts +++ b/std/testing/asserts.ts @@ -247,7 +247,11 @@ export function assertStrictEquals( expected: unknown, msg?: string, ): void; -export function assertStrictEquals(actual: T, expected: T, msg?: string): void; +export function assertStrictEquals( + actual: T, + expected: T, + msg?: string, +): void; export function assertStrictEquals( actual: unknown, expected: unknown, @@ -303,7 +307,11 @@ export function assertNotStrictEquals( expected: unknown, msg?: string, ): void; -export function assertNotStrictEquals(actual: T, expected: T, msg?: string): void; +export function assertNotStrictEquals( + actual: T, + expected: T, + msg?: string, +): void; export function assertNotStrictEquals( actual: unknown, expected: unknown, @@ -314,7 +322,7 @@ export function assertNotStrictEquals( } throw new AssertionError( - msg ?? `Expected "actual" to be strictly unequal to: ${_format(actual)}\n` + msg ?? `Expected "actual" to be strictly unequal to: ${_format(actual)}\n`, ); } diff --git a/std/testing/asserts_test.ts b/std/testing/asserts_test.ts index 23d89aa87799d7..65645b06bcea00 100644 --- a/std/testing/asserts_test.ts +++ b/std/testing/asserts_test.ts @@ -464,31 +464,31 @@ Deno.test({ }); Deno.test({ - name: 'strictly unequal pass case', + name: "strictly unequal pass case", fn(): void { assertNotStrictEquals(true, false); assertNotStrictEquals(10, 11); - assertNotStrictEquals('abc', 'xyz'); + assertNotStrictEquals("abc", "xyz"); assertNotStrictEquals(1, "1"); - const xs = [1, false, 'foo']; - const ys = [1, true, 'bar']; + const xs = [1, false, "foo"]; + const ys = [1, true, "bar"]; assertNotStrictEquals(xs, ys); const x = { a: 1 }; const y = { a: 2 }; assertNotStrictEquals(x, y); - } + }, }); Deno.test({ - name: 'strictly unequal fail case', + name: "strictly unequal fail case", fn(): void { assertThrows( () => assertNotStrictEquals(1, 1), - AssertionError - ) - } + AssertionError, + ); + }, }); Deno.test({