atool-test-mocha

Unit testing tool based on mocha & sinon & chai, run tests with jsdom

Usage no npm install needed!

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

README

atool-test-mocha

note: Tests with browser, use atool-test

NPM version Build Status Coverage Status

Simple configuration, run tests with jsdom.

Built-in

Usage

npm install atool-test-mocha --save-dev
"srcipts": {
  "test": "atool-test-mocha"
}

Options

  • --coverage: coverage output;
  • --custom-compiler: set path of custom compiler file;
  • support mocha cli options (--bail, --timeout, --watch, --recursive...)

Custom testDir

default tests dir test, cutom dir atool-test-mocha ${customDirName}