We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b922729 commit 4364c72Copy full SHA for 4364c72
packages/utils/src/assert.spec.ts
@@ -1,6 +1,17 @@
1
-import { assertDefined, assertDefinedAndNotNull } from "./assert";
+import { assert, assertDefined, assertDefinedAndNotNull } from "./assert";
2
3
describe("assert", () => {
4
+
5
+ describe("assert", () => {
6
+ it('assert should not throw an error when condition is truthy', () => {
7
+ expect(() => assert(true)).not.toThrow();
8
+ });
9
10
+ it('assert should throw an error with default message when condition is falsy', () => {
11
+ expect(() => assert(false)).toThrowError("condition is not truthy");
12
13
14
15
describe("assertDefined", () => {
16
it("passes for simple values", () => {
17
{
0 commit comments