diff --git a/packages/utils/src/assert.spec.ts b/packages/utils/src/assert.spec.ts index 669405a5..2631596b 100644 --- a/packages/utils/src/assert.spec.ts +++ b/packages/utils/src/assert.spec.ts @@ -1,6 +1,17 @@ -import { assertDefined, assertDefinedAndNotNull } from "./assert"; +import { assert, assertDefined, assertDefinedAndNotNull } from "./assert"; describe("assert", () => { + + describe("assert", () => { + it('assert should not throw an error when condition is truthy', () => { + expect(() => assert(true)).not.toThrow(); + }); + + it('assert should throw an error with default message when condition is falsy', () => { + expect(() => assert(false)).toThrowError("condition is not truthy"); + }); + }); + describe("assertDefined", () => { it("passes for simple values", () => { {