tjs:assert
Assertions module.
Provides a collection of assertion functions for testing and validation. Assertions throw on failure, making them suitable for use in test suites.
import assert from 'tjs:assert';
assert.eq(1 + 1, 2, 'math works');
assert.ok(true, 'is truthy');
assert.throws(() => { throw new Error('boom'); }, /boom/);
Interfaces
- BooleanAssertionFunction
- ComparatorAssertionFunction
- IAssert
- IAssertionResult
- IAssertOptions
- MessageAssertionFunction
Type Aliases
Variables
References
default
Renames and re-exports Assert