An object for asserting the truth of the
Example
function foo(bar) {
return bar;
}
const test = Assertion(foo, ['hello'], 'hello');
// Returns 'true'
console.log(test.assert());
Members
(static) this.args
The arguments to be passed to the function.
(static) this.expected
The expected result when the function is passed the arguments.
(static) this.func
Function to be assessed.
Methods
(static) this.assert() → {String}
Asserts that the stored function produces the expected result when passed the given arguments.
Returns:
- Type
- String