std/testing/asserts.ts

Deno standard library
Go to Latest
function assertArrayIncludes
import { assertArrayIncludes } from "https://deno.land/std@0.102.0/testing/asserts.ts?s=assertArrayIncludes";

Make an assertion that actual includes the expected values. If not then an error will be thrown.

Type parameter can be specified to ensure values under comparison have the same type. For example:

assertArrayIncludes<number>([1, 2], [2])

Parameters

actual: ArrayLike<unknown>[src]
expected: ArrayLike<unknown>[src]
optional
msg: string
[src]

Parameters

actual: ArrayLike<T>[src]
expected: ArrayLike<T>[src]
optional
msg: string
[src]

Parameters

actual: ArrayLike<unknown>[src]
expected: ArrayLike<unknown>[src]
optional
msg: string
[src]