summaryrefslogtreecommitdiff
path: root/std/testing/asserts_test.ts
diff options
context:
space:
mode:
authorJoel Chippindale <joel@joelchippindale.com>2020-06-13 15:01:05 +0100
committerGitHub <noreply@github.com>2020-06-13 10:01:05 -0400
commitf6fa65938437385a4ec00ec090f797381f6638b7 (patch)
treeb58dcfe05c6ee10e62db41e7a7e52a4f48099a3d /std/testing/asserts_test.ts
parent0bc70b89c05a157d527786631d59613052e5cf36 (diff)
Fix assertEqual so that it handles URL objects (#6278)
Diffstat (limited to 'std/testing/asserts_test.ts')
-rw-r--r--std/testing/asserts_test.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/std/testing/asserts_test.ts b/std/testing/asserts_test.ts
index 7f2d978ea..36d054356 100644
--- a/std/testing/asserts_test.ts
+++ b/std/testing/asserts_test.ts
@@ -112,6 +112,15 @@ Deno.test("testingEqual", function (): void {
assert(!equal([1, 2, 3, 4], [1, 4, 2, 3]));
assert(equal(new Uint8Array([1, 2, 3, 4]), new Uint8Array([1, 2, 3, 4])));
assert(!equal(new Uint8Array([1, 2, 3, 4]), new Uint8Array([2, 1, 4, 3])));
+ assert(
+ equal(new URL("https://example.test"), new URL("https://example.test"))
+ );
+ assert(
+ !equal(
+ new URL("https://example.test"),
+ new URL("https://example.test/with-path")
+ )
+ );
});
Deno.test("testingNotEquals", function (): void {