All files / assert / mod.ts

100.00% Branches 0/0
100.00% Lines 27/27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
x1029
x1029
x1029
x1029
x1029
x1029
x1029
x1029
x1029
x1029
x1029
x1029
x1029
x1029
x1029
x1029
x1029
x1029
x1029
x1029
x1029
x1029
x1029
x1029
x1029
x1029
x1029













































// Copyright 2018-2025 the Deno authors. MIT license.
// This module is browser compatible.

/** 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.
 *
 * ```ts ignore
 * import { assert } from "@std/assert";
 *
 * assert("I am truthy"); // Doesn't throw
 * assert(false); // Throws `AssertionError`
 * ```
 *
 * @module
 */

export * from "./almost_equals.ts";
export * from "./array_includes.ts";
export * from "./equals.ts";
export * from "./exists.ts";
export * from "./false.ts";
export * from "./greater_or_equal.ts";
export * from "./greater.ts";
export * from "./instance_of.ts";
export * from "./is_error.ts";
export * from "./less_or_equal.ts";
export * from "./less.ts";
export * from "./match.ts";
export * from "./not_equals.ts";
export * from "./not_instance_of.ts";
export * from "./not_match.ts";
export * from "./not_strict_equals.ts";
export * from "./object_match.ts";
export * from "./rejects.ts";
export * from "./strict_equals.ts";
export * from "./string_includes.ts";
export * from "./throws.ts";
export * from "./assert.ts";
export * from "./assertion_error.ts";
export * from "./equal.ts";
export * from "./fail.ts";
export * from "./unimplemented.ts";
export * from "./unreachable.ts";