Module

std/assert/mod.ts>assertStringIncludes

The Deno Standard Library
Go to Latest
function assertStringIncludes
import { assertStringIncludes } from "https://dotland.deno.dev/std@0.223.0/assert/mod.ts";

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

Examples

Example 1

import { assertStringIncludes } from "https://deno.land/std@0.223.0/assert/assert_string_includes.ts";

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

Parameters

actual: string
expected: string
optional
msg: string