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-03-05 03:57:27 +00:00
|
|
|
* ```ts
|
2024-04-29 02:57:30 +00:00
|
|
|
* import { assert } from "@std/assert/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
|
|
|
|
*/
|
|
|
|
|
|
|
|
export * from "./assert_almost_equals.ts";
|
|
|
|
export * from "./assert_array_includes.ts";
|
|
|
|
export * from "./assert_equals.ts";
|
|
|
|
export * from "./assert_exists.ts";
|
|
|
|
export * from "./assert_false.ts";
|
2023-08-30 05:35:32 +00:00
|
|
|
export * from "./assert_greater_or_equal.ts";
|
|
|
|
export * from "./assert_greater.ts";
|
2023-07-13 07:04:30 +00:00
|
|
|
export * from "./assert_instance_of.ts";
|
|
|
|
export * from "./assert_is_error.ts";
|
2023-08-30 05:35:32 +00:00
|
|
|
export * from "./assert_less_or_equal.ts";
|
|
|
|
export * from "./assert_less.ts";
|
2023-07-13 07:04:30 +00:00
|
|
|
export * from "./assert_match.ts";
|
|
|
|
export * from "./assert_not_equals.ts";
|
|
|
|
export * from "./assert_not_instance_of.ts";
|
|
|
|
export * from "./assert_not_match.ts";
|
|
|
|
export * from "./assert_not_strict_equals.ts";
|
|
|
|
export * from "./assert_object_match.ts";
|
|
|
|
export * from "./assert_rejects.ts";
|
|
|
|
export * from "./assert_strict_equals.ts";
|
|
|
|
export * from "./assert_string_includes.ts";
|
|
|
|
export * from "./assert_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";
|