diff options
author | Casper Beyer <caspervonb@pm.me> | 2020-06-24 20:29:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-24 08:29:50 -0400 |
commit | f318ab01a47cecac9df62d11cb0c745f39523da9 (patch) | |
tree | 7d43102c3f5456d93c8f65fd21aa11fd71f89292 /std/testing/asserts_test.ts | |
parent | 1d8fc394945fb4447cec23fbfc61fc8961126b7a (diff) |
fix(std/testing) assertArrayContains should work with any array-like (#6402)
Diffstat (limited to 'std/testing/asserts_test.ts')
-rw-r--r-- | std/testing/asserts_test.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/std/testing/asserts_test.ts b/std/testing/asserts_test.ts index 8b79ddf8a..35ce50031 100644 --- a/std/testing/asserts_test.ts +++ b/std/testing/asserts_test.ts @@ -159,6 +159,10 @@ Deno.test("testingArrayContains", function (): void { const fixtureObject = [{ deno: "luv" }, { deno: "Js" }]; assertArrayContains(fixture, ["deno"]); assertArrayContains(fixtureObject, [{ deno: "luv" }]); + assertArrayContains( + Uint8Array.from([1, 2, 3, 4]), + Uint8Array.from([1, 2, 3]) + ); assertThrows( (): void => assertArrayContains(fixtureObject, [{ deno: "node" }]), AssertionError, |