Creates and returns a new instance of the IAssertClass interface that can be used to perform various assertions, the functions check the provided expression and throw an AssertionFailure if the expression is false.
A new instance of the IAssertClass interface.
import { createAssert } from "@nevware21/tripwire";const assert = createAssert();assert(1 === 1);assert(true, "This is true");assert(false, "This is false");assert.equal(1, 1);assert.isTrue(true);assert.isFalse(false);assert.isNull(null);assert.isUndefined(undefined); Copy
import { createAssert } from "@nevware21/tripwire";const assert = createAssert();assert(1 === 1);assert(true, "This is true");assert(false, "This is false");assert.equal(1, 1);assert.isTrue(true);assert.isFalse(false);assert.isNull(null);assert.isUndefined(undefined);
0.1.0
Creates and returns a new instance of the IAssertClass interface that can be used to perform various assertions, the functions check the provided expression and throw an AssertionFailure if the expression is false.