Skip to content
Cutie extension for assert module in Node
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
fs
json
src
test
.eslintrc.json
.gitignore
.travis.yml
LICENSE
README.md
build.js
index.js
package-lock.json
package.json
test.js

README.md

cutie-assert

NPM Version Build Status codecov

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.

Install

npm install @cuties/assert

Run test

npm test

Run build

npm run build

Usage

const {
  // Here needed async objects from the table below
} = require('@cuties/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
DeepStrictEqualAssertion assert.deepStrictEqual 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)
NotDeepStrictEqualAssertion assert.notDeepStrictEqual 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
You can’t perform that action at this time.