Make an assertion, error will be thrown if expr does not have truthy value.
expr
The expression to test.
The optional message to display if the assertion fails.
import { assert } from "@std/assert";assert("hello".includes("ello")); // Doesn't throwassert("hello".includes("world")); // Throws Copy
import { assert } from "@std/assert";assert("hello".includes("ello")); // Doesn't throwassert("hello".includes("world")); // Throws
Make an assertion, error will be thrown if
exprdoes not have truthy value.