Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/denoexec/deps.ts>testing.assertArrayIncludes

A higher level wrapper around https://doc.deno.land/builtin/stable#Deno.run
Latest
function testing.assertArrayIncludes
import { testing } from "https://deno.land/x/denoexec@v1.1.5/deps.ts";
const { assertArrayIncludes } = testing;

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:

import { assertArrayIncludes } from "./asserts.ts";

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

Parameters

actual: ArrayLike<unknown>
expected: ArrayLike<unknown>
optional
msg: string

Parameters

actual: ArrayLike<T>
expected: ArrayLike<T>
optional
msg: string