package
Lightweight browser-friendly Javascript assertions.
npm install @dashkite/assertGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 2 packages.
714.4 kB
Includes dependencies.
Lightweight browser-friendly Javascript assertions.
assert isDefined foo
assert.equal foo, bar
assert.deepEqual foo, bar
assert.throws -> throw "oh no"
assert.rejects -> Promise.reject "oh no"assert takes only true — no “truth” valuesnpm i @dashkite/assertassert condition → boolean
Returns true if condition is true, throws otherwise.
assert.equal expected, actual → boolean
Returns true if expected is strictly equal to actual, throws otherwise.
assert.notEqual expected, actual → boolean
Returns true if expected is strictly not equal to actual, throws otherwise.
assert.deepEqual expected, actual → boolean
Returns true if expected is deep equal to actual, throws otherwise.
assert.notDeepEqual expected, actual → boolean
Returns true if expected is not deep equal to actual, throws otherwise.
assert.throws function → boolean
Returns true if function throws, throws otherwise.
assert.throws function → boolean
Returns true if function does not throw, throws otherwise.
assert.rejects function → boolean
Returns true if function returns a promise that rejects, throws otherwise.
assert.rejects function → boolean
Returns true if function returns a promise that does not reject, throws otherwise.
freeformflow
real.david.harper@gmail.com