Files
freeCodeCamp/guide/english/miscellaneous/chaijs-assertexpression-message/index.md
2018-10-16 21:32:40 +05:30

428 B

title
title
Chaijs Assertexpression 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(<a href='http://chaijs.com/api/assert/' target='_blank' rel='nofollow'>]), 'empty arrays are arrays');

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