mocha-bootstrap

Standard test harness for using Mocha with Sinon and Chai

Usage no npm install needed!

<script type="module">
  import mochaBootstrap from 'https://cdn.skypack.dev/mocha-bootstrap';
</script>

README

Mocha test bootstrap

Sets up Sinon, Chai as Promised, Sinon-Chai and Chai as Promised.

Also installs an accelerated implementation of Sinon's .createStubInstance(...) method for speed.

Usage

First install with NPM:

npm install --save-dev mocha-bootstrap

then require the bootstrap when running Mocha, for example:

mocha -r mocha-bootstrap --recursive test/unit/