Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
denoland/stdWorks with
•JSR Score100%•This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers




License
•MIT
Downloads89,123/wk
•Published3 months ago (1.0.19)
Common assertion functions, especially useful for testing
A library of assertion functions.
If the assertion is false an AssertionError will be thrown which will
result in pretty-printed diff of the failing assertion.
This module is browser compatible, but do not rely on good formatting of values for AssertionError messages in browsers.
import { assert } from "@std/assert"; assert("I am truthy"); // Doesn't throw assert(false); // Throws `AssertionError`
Built and signed on
GitHub Actions
Add Package
deno add jsr:@std/assert
Import symbol
import * as assert from "@std/assert";
Import directly with a jsr specifier
import * as assert from "jsr:@std/assert";