assert
A cheatsheet by @rstacruz|Refreshed 7 months ago.Refresh|View source on Github

Assertions

Assertions

assert(val)
assert.equal(actual, expected)
assert.notEqual(a, e)
assert.deepEqual(a, e)
assert.notDeepEqual(a, e)
assert.throws(fn)

References

References

  • http://nodejs.org/api/assert.html
This cheat sheet can be found in the following categories: