The type of the result of the operation.
A decorative / alias operation which returns the current instance, useful for chaining operations to provide a more descriptive description of the operations being performed within your tests.
A decorative / alias operation which returns the current instance, useful for chaining operations to provide a more descriptive description of the operations being performed within your tests.
Alias for closeTo. Asserts that the target is a number approximately equal to the given number within a specified delta.
Asserts that the value is an array.
The current IAssertScope.that object.
An AssertionFailure if the assertion fails.
Asserts that the value is a boolean.
The current IAssertScope.that object.
An AssertionFailure if the assertion fails.
Asserts that the target is a number close to the given number within a specified delta. This is useful for floating-point comparisons where exact equality is not guaranteed.
Asserts that the value is empty.
The current IAssertScope.that object.
An AssertionFailure if the assertion fails.
Performs an equality check between the actual and expected values, throwing an
AssertionFailure with the given message when the actual value is not equal to
the expected value. The default equality check is a loose (==) equality check,
to perform a strict equality check (===), use the IStrictlyOp.equal
(strictly.equal) operations and when comparing complex objects, use the deep
equality operations provided by the IDeepOp.equal (deep.equal) operations or
(deep.strictly.equal) for deep strict equality checks.
IStrictlyOp.eq (strictly.eq) operations.
An AssertionFailure if the expected and actual values are strictly equal.
assert.eq(1, 1); // Passes
assert.eq("a", "a"); // Passes
assert.eq(true, true); // Passes
assert.eq(false, false); // Passes
assert.eq(null, null); // Passes
assert.eq(undefined, undefined); // Passes
assert.eq(0, 0); // Passes
assert.eq(-0, -0); // Passes
assert.eq(+0, +0); // Passes
assert.eq(0n, 0n); // Passes
assert.eq("", ""); // Passes
assert.eq(Symbol(), Symbol()); // Passes
assert.eq([], []); // Throws AssertionError
assert.eq([1, 2], [1, 2]); // Throws AssertionError
Performs an equality check between the actual and expected values, throwing an
AssertionFailure with the given message when the actual value is not equal to
the expected value. The default equality check is a loose (==) equality check,
to perform a strict equality check (===), use the IStrictlyOp.equal
(strictly.equal) operations and when comparing complex objects, use the deep
equality operations provided by the IDeepOp.equal (deep.equal) operations or
(deep.strictly.equal) for deep strict equality checks.
An AssertionFailure if the expected and actual values are not strictly equal.
assert.equal(1, 1); // Passes
assert.equal("a", "a"); // Passes
assert.equal(true, true); // Passes
assert.equal(false, false); // Passes
assert.equal(null, null); // Passes
assert.equal(undefined, undefined); // Passes
assert.equal(0, 0); // Passes
assert.equal(-0, -0); // Passes
assert.equal(+0, +0); // Passes
assert.equal(0n, 0n); // Passes
assert.equal("", ""); // Passes
assert.equal(Symbol(), Symbol()); // Passes
assert.equal([], []); // Throws AssertionError
assert.equal([1, 2], [1, 2]); // Throws AssertionError
Performs an equality check between the actual and expected values, throwing an
AssertionFailure with the given message when the actual value is not equal to
the expected value. The default equality check is a loose (==) equality check,
to perform a strict equality check (===), use the IStrictlyOp.equal
(strictly.equal) operations and when comparing complex objects, use the deep
equality operations provided by the IDeepOp.equal (deep.equal) operations or
(deep.strictly.equal) for deep strict equality checks.
An AssertionFailure if the expected and actual values are strictly equal.
assert.equals(1, 1); // Passes
assert.equals("a", "a"); // Passes
assert.equals(true, true); // Passes
assert.equals(false, false); // Passes
assert.equals(null, null); // Passes
assert.equals(undefined, undefined); // Passes
assert.equals(0, 0); // Passes
assert.equals(-0, -0); // Passes
assert.equals(+0, +0); // Passes
assert.equals(0n, 0n); // Passes
assert.equals("", ""); // Passes
assert.equals(Symbol(), Symbol()); // Passes
assert.equals([], []); // Throws AssertionError
assert.equals([1, 2], [1, 2]); // Throws AssertionError
Asserts that the value is an error or matches the provided error constructor.
The current IAssertScope.that object.
An AssertionFailure if the assertion fails.
Asserts that the value is extensible.
The current IAssertScope.that object.
An AssertionFailure if the assertion fails.
Asserts that the value is false.
The current IAssertScope.that object.
An AssertionFailure if the assertion fails.
Asserts that the value is a finite number (not NaN, not Infinity, not -Infinity).
The current IAssertScope.that object.
An AssertionFailure if the assertion fails.
Asserts that the value is frozen.
The current IAssertScope.that object.
An AssertionFailure if the assertion fails.
Asserts that the value is a function.
The current IAssertScope.that object.
An AssertionFailure if the assertion fails.
Asserts that the value is an instance of the specified constructor.
The current IAssertScope.that object.
An AssertionFailure if the assertion fails.
Asserts that the value is an instance of the specified constructor.
The current IAssertScope.that object.
An AssertionFailure if the assertion fails.
Asserts that the value is iterable.
The current IAssertScope.that object.
An AssertionFailure if the assertion fails.
Asserts that the value is NaN.
The current IAssertScope.that object.
An AssertionFailure if the assertion fails.
Negates any performed evaluations that are performed in the assertion chain.
This operation applies a stateful change to the evaluation chain, meaning
that subsequent operations that would normally fail will pass without the need
for them to "implement" any knowledge about the not operation. You may call
not multiple times to negate the negation.
Asserts that the value is null.
The current IAssertScope.that object.
An AssertionFailure if the assertion fails.
Asserts that the value is a number.
The current IAssertScope.that object.
An AssertionFailure if the assertion fails.
Asserts that the value is an object.
The current IAssertScope.that object.
An AssertionFailure if the assertion fails.
Asserts that the value is truthy.
The current IAssertScope.that object.
An AssertionFailure if the assertion fails.
Asserts that the target value is a member of the given list. Uses strict equality (===) to check if the value is in the list.
Asserts that the value is a plain object.
The current IAssertScope.that object.
An AssertionFailure if the assertion fails.
Asserts that the value is sealed.
The current IAssertScope.that object.
An AssertionFailure if the assertion fails.
Provides access to operations to confirm that the value strictly matches the type based on the used assertion operator.
Asserts that the value is a string.
The current IAssertScope.that object.
An AssertionFailure if the assertion fails.
Asserts that the value is true.
The current IAssertScope.that object.
An AssertionFailure if the assertion fails.
Asserts that the value is truthy.
The current IAssertScope.that object.
An AssertionFailure if the assertion fails.
Asserts that the value is undefined.
The current IAssertScope.that object.
An AssertionFailure if the assertion fails.
Asserts that the value's type matches the expected type string.
Uses the JavaScript typeof operator for type comparison.
Valid type strings include:
The expected type string (e.g., "string", "number", "function")
OptionalevalMsg: MsgSourceThe custom message to display on evaluation.
The current IAssertScope.that object.
An AssertionFailure if the assertion fails.
Represents an interface for operations on an assertion scope confirming the type of a value.