summaryrefslogtreecommitdiff
path: root/std/node/assert_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/node/assert_test.ts')
-rw-r--r--std/node/assert_test.ts65
1 files changed, 65 insertions, 0 deletions
diff --git a/std/node/assert_test.ts b/std/node/assert_test.ts
new file mode 100644
index 000000000..8df13187b
--- /dev/null
+++ b/std/node/assert_test.ts
@@ -0,0 +1,65 @@
+import {
+ assert as denoAssert,
+ assertEquals,
+ assertNotEquals,
+ assertStrictEquals,
+ assertNotStrictEquals,
+ assertMatch,
+ assertThrows,
+ fail as denoFail,
+} from "../testing/asserts.ts";
+
+import assert from "./assert.ts";
+
+import {
+ ok,
+ assert as assert_,
+ deepStrictEqual,
+ notDeepStrictEqual,
+ strictEqual,
+ notStrictEqual,
+ match,
+ throws,
+ fail,
+} from "./assert.ts";
+
+Deno.test("API should be exposed", () => {
+ assertStrictEquals(
+ assert_,
+ assert,
+ "`assert()` should be the default export",
+ );
+ assertStrictEquals(assert_, denoAssert, "`assert()` should be exposed");
+ assertStrictEquals(assert_, ok, "`assert()` should be an alias of `ok()`");
+ assertStrictEquals(
+ assertEquals,
+ deepStrictEqual,
+ "`assertEquals()` should be exposed as `deepStrictEqual()`",
+ );
+ assertStrictEquals(
+ assertNotEquals,
+ notDeepStrictEqual,
+ "`assertNotEquals()` should be exposed as `notDeepStrictEqual()`",
+ );
+ assertStrictEquals(
+ assertStrictEquals,
+ strictEqual,
+ "`assertStrictEquals()` should be exposed as `strictEqual()`",
+ );
+ assertStrictEquals(
+ assertNotStrictEquals,
+ notStrictEqual,
+ "`assertNotStrictEquals()` should be exposed as `notStrictEqual()`",
+ );
+ assertStrictEquals(
+ assertMatch,
+ match,
+ "`assertMatch()` should be exposed as `match()`",
+ );
+ assertStrictEquals(
+ assertThrows,
+ throws,
+ "`assertThrows()` should be exposed as `throws()`",
+ );
+ assertStrictEquals(fail, denoFail, "`fail()` should be exposed");
+});