diff options
author | Schwarzkopf Balázs <schwarzkopfb@icloud.com> | 2020-08-20 17:56:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-20 11:56:31 -0400 |
commit | 87b1b8c461d54170d2cd2d9232659837c1eeadc0 (patch) | |
tree | 61e69e9b1be0dd17b149e75e00b66a7e815b44b0 /std/node/assert_test.ts | |
parent | 5adb6cba3ee443801a4d54e894284183ef096364 (diff) |
fix(std/node): misnamed assert exports (#7123)
Diffstat (limited to 'std/node/assert_test.ts')
-rw-r--r-- | std/node/assert_test.ts | 65 |
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"); +}); |