Skip to content
Quincy Larson edited this page Aug 20, 2016 · 1 revision

Assert(expression, message)

  • @param{ Mixed }expressionto test for truthiness
  • @param{ String }messageto display on error

Write your own test expressions.

assert('foo' !== 'bar', 'foo is not bar');
assert(Array.isArray([]), 'empty arrays are arrays');

details: http://chaijs.com/api/assert/

Clone this wiki locally