Skip to content

Testing

Yotam Mann edited this page Sep 7, 2018 · 3 revisions

Tone.js has an extensive test suite built on karma, mocha and chai.

Installing

To install all testing dependencies:

npm install

All tests

To run all tests on Chrome and Firefox using Karma Test Runner:

npm run test

Testing files

To test an individual file with karma:

npm run test --file=Oscillator

(replace Oscillator with the name of the test file you'd like to run)

Testing directories

To run all tests in a directory run:

npm run test --dir=core

(replace core with the name of the directory you'd like to run)