2024-01-01 21:11:32 +00:00
|
|
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2024-04-10 02:43:44 +00:00
|
|
|
// This module is browser compatible.
|
2023-07-13 07:04:30 +00:00
|
|
|
|
|
|
|
/** A library of assertion functions.
|
|
|
|
* If the assertion is false an `AssertionError` will be thrown which will
|
|
|
|
* result in pretty-printed diff of failing assertion.
|
|
|
|
*
|
|
|
|
* This module is browser compatible, but do not rely on good formatting of
|
|
|
|
* values for AssertionError messages in browsers.
|
|
|
|
*
|
2024-09-19 23:29:31 +00:00
|
|
|
* ```ts ignore
|
refactor(assert,async,bytes,cli,collections,crypto,csv,data-structures,datetime,dotenv,encoding,expect,fmt,front-matter,fs,html,http,ini,internal,io,json,jsonc,log,media-types,msgpack,net,path,semver,streams,testing,text,toml,ulid,url,uuid,webgpu,yaml): import from `@std/assert` (#5199)
* refactor: import from `@std/assert`
* update
2024-06-30 08:30:10 +00:00
|
|
|
* import { assert } from "@std/assert";
|
2024-03-05 03:57:27 +00:00
|
|
|
*
|
|
|
|
* assert("I am truthy"); // Doesn't throw
|
|
|
|
* assert(false); // Throws `AssertionError`
|
|
|
|
* ```
|
|
|
|
*
|
2023-07-13 07:04:30 +00:00
|
|
|
* @module
|
|
|
|
*/
|
|
|
|
|
2024-07-02 03:42:40 +00:00
|
|
|
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";
|
2023-07-13 07:04:30 +00:00
|
|
|
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";
|