Namespace: Assertion

Assertion

An object for asserting the truth of the

Source:

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.

Source:

(static) this.expected

The expected result when the function is passed the arguments.

Source:

(static) this.func

Function to be assessed.

Source:

Methods

(static) this.assert() → {String}

Asserts that the stored function produces the expected result when passed the given arguments.

Source:
Returns:
Type
String