@cuties/cutie-assert
v1.1.2
Published
Cutie extension for assert module in Node.
Downloads
1
Readme
cutie-assert
Cutie extension for assert module in Node. It's based on the Async Tree Pattern.
Examples
You can find examples of using this library in the test directory.
Usage
const {
// Here needed async objects from the table below
} = require('@guseyn/cutie-assert');
For more information about parameters in the async objects visit docs of Node for assert module.
| Async Object | Async/sync call | Parameters(default value/description) | Representation result |
| ------------- | ----------------| ---------- | --------------------- |
| Assertion
| assert
| value, message
| value
|
| DeepEqualAssertion
| assert.deepEqual
| actual, expected, message
| actual
|
| DeepStrictEqualAssertion
| assert.deepStrictEqual
| actual, expected, message
| actual
|
| EqualAssertion
| assert.equal
| actual, expected, message
| actual
|
| FailedAssertion
| assert.fail
| actual, expected, message, operator ('!='), stackStartFunction (assert.fail)
| thrown error
|
| FailedAssertionWithMessageOnly
| assert.fail
| message
| thrown error
|
| IfErrorAssertion
| assert.ifError
| value
| thrown error
or value
(if it's false) |
| NotDeepEqualAssertion
| assert.notDeepEqual
| actual, expected, message
| actual
|
| NotDeepStrictEqualAssertion
| assert.notDeepStrictEqual
| actual, expected, message
| actual
|
| NotEqualAssertion
| assert.notEqual
| actual, expected, message
| actual
|
| NotStrictEqualAssertion
| assert.notStrictEqual
| actual, expected, message
| actual
|
| NotThrownErrorAssertion
| assert.doesNotThrow
| block, error, message
| block
|
| OkAssertion
| assert.ok
| value, message
| value
|
| StrictEqualAssertion
| assert.strictEqual
| actual, expected, message
| actual
|
| ThrownErrorAssertion
| assert.throws
| block, error, message
| block
|