Skip to main content
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function assertStringIncludes
Deprecated
Deprecated

(will be removed after 1.0.0) Import from https://deno.land/std/assert/assert_string_includes.ts instead.

import { assertStringIncludes } from "https://deno.land/std@0.218.0/testing/asserts.ts";

Make an assertion that actual includes expected. If not then throw.

Examples

Example 1

import { assertStringIncludes } from "https://deno.land/std@0.218.0/testing/asserts.ts";

assertStringIncludes("Hello", "ello"); // Doesn't throw
assertStringIncludes("Hello", "world"); // Throws

Parameters

actual: string
expected: string
optional
msg: string