diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2020-06-12 20:23:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-12 15:23:38 -0400 |
commit | 1fff6f55c3ba98a10018c6d374795e612061e9b6 (patch) | |
tree | 12074b6d44736b11513d857e437f9e30a6bf65a4 /std/testing/diff_test.ts | |
parent | 26bf56afdaf16634ffbaa23684faf3a44cc10f62 (diff) |
refactor: Don't destructure the Deno namespace (#6268)
Diffstat (limited to 'std/testing/diff_test.ts')
-rw-r--r-- | std/testing/diff_test.ts | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/std/testing/diff_test.ts b/std/testing/diff_test.ts index 317dc0db8..072f39622 100644 --- a/std/testing/diff_test.ts +++ b/std/testing/diff_test.ts @@ -1,15 +1,14 @@ import diff from "./diff.ts"; import { assertEquals } from "../testing/asserts.ts"; -const { test } = Deno; -test({ +Deno.test({ name: "empty", fn(): void { assertEquals(diff([], []), []); }, }); -test({ +Deno.test({ name: '"a" vs "b"', fn(): void { assertEquals(diff(["a"], ["b"]), [ @@ -19,28 +18,28 @@ test({ }, }); -test({ +Deno.test({ name: '"a" vs "a"', fn(): void { assertEquals(diff(["a"], ["a"]), [{ type: "common", value: "a" }]); }, }); -test({ +Deno.test({ name: '"a" vs ""', fn(): void { assertEquals(diff(["a"], []), [{ type: "removed", value: "a" }]); }, }); -test({ +Deno.test({ name: '"" vs "a"', fn(): void { assertEquals(diff([], ["a"]), [{ type: "added", value: "a" }]); }, }); -test({ +Deno.test({ name: '"a" vs "a, b"', fn(): void { assertEquals(diff(["a"], ["a", "b"]), [ @@ -50,7 +49,7 @@ test({ }, }); -test({ +Deno.test({ name: '"strength" vs "string"', fn(): void { assertEquals(diff(Array.from("strength"), Array.from("string")), [ @@ -67,7 +66,7 @@ test({ }, }); -test({ +Deno.test({ name: '"strength" vs ""', fn(): void { assertEquals(diff(Array.from("strength"), Array.from("")), [ @@ -83,7 +82,7 @@ test({ }, }); -test({ +Deno.test({ name: '"" vs "strength"', fn(): void { assertEquals(diff(Array.from(""), Array.from("strength")), [ @@ -99,7 +98,7 @@ test({ }, }); -test({ +Deno.test({ name: '"abc", "c" vs "abc", "bcd", "c"', fn(): void { assertEquals(diff(["abc", "c"], ["abc", "bcd", "c"]), [ |