Common initialization file for Mocha when used with @sinonjs/referee-sinon.
Installs global beforeEach
and afterEach
hooks for Mocha to verify that
- each test has at least one referee assertion
- the global Sinon sandbox is restored with
sinon.restore()
Install in devDependencies
:
❯ npm install -D mocha-referee-sinon
❯ mocha --file ./node_modules/mocha-referee-sinon
1.0.0
: Mocha 5.2,@sinonjs/referee-sinon
5.0
MIT