Mocha ASSERTIONS

ASSERTIONS

Mocha allows you to use any assertion library you wish. In the above example, we’re using Node.js’ built-in assert module–but generally, if it throws an Error, it will work! This means you can use libraries such as:

should.js – BDD style shown throughout these docs
expect.js – expect() style assertions
chai – expect(), assert() and should-style assertions
better-assert – C-style self-documenting assert()
unexpected – “the extensible BDD assertion toolkit”

Questions