Skip to content

chai assert

Arsen Melikyan edited this page · 2 revisions
Clone this wiki locally

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/

Something went wrong with that request. Please try again.