Tone.js/test
2019-01-09 22:30:22 -05:00
..
audio
component
control
core adding start method to simplify starting AudioContext 2019-01-09 22:30:22 -05:00
effect
event removing logging from test 2019-01-09 18:34:47 -05:00
helper Revert "trying out online testing with Chrome flag" 2019-01-09 22:22:02 -05:00
html removing old example tests 2019-01-08 22:22:09 -05:00
instrument
signal
source
type
index.html
README.md

I am currently using two test runners: mocha and karma + mocha.

From within the gulp folder, run gulp karma-test to collect all of the files, launch a local server and run the tests.

Be sure that the browser window is in focus while tests are running.

Individual files can be tested by running gulp collectTests -f [Tone class name] which will update the test/Main.js with the given class' tests. You can then refresh the test/index.html page to rerun those tests.

You can also test groups of classes by folder by adding another flag. For example to test all of the signals run gulp collectTests --signal. or the shorthand form: gulp collectTests -s.

  • -s = --signal
  • -i = --instrument
  • -o = --source
  • -v = --event
  • -e = --effect
  • -c = --core
  • -m = --component
  • -t = --control

The tests target the latest specification and not any specific browser. I have been keeping a list of which features browsers/versions currently support in test/helper/Supports.js. Some tests are only conditionally run if that feature is supported on the platform.