Chai-QUnit is a layer on top of QUnit using the chai assertion library.
bower install --save-dev chai-qunit
npm install --save-dev chai-qunit
Then include it using a script tag:
or use your favorite module system (AMD, CJS, ES6):
var chaiQUnit = ;chaiQUnit;
Chai tends to have better error messages if you don't provide one yourself, and
has a bunch of other useful helpers(like
and a robust plugin system for creating your own.
See the Chai Docs for more usage information, but this implementation
currently uses the
assert syntax exposed as globals (
are planned to be supported soon). For example, with chai standalone, you would
assert.matches("hello", /hello/i). In chai-qunit, you would say
MIT. See the
LICENSE file included with this repository.