Tone.js/test
2019-11-14 13:36:00 -05:00
..
audio feat: Chorus extends StereoFeedbackEffect 2019-11-13 12:58:37 -05:00
component Merge branch 'pr/521' into typescript 2019-08-19 19:02:07 -07:00
control testing that changing pattern length should update shuffle 2019-02-01 11:33:26 -05:00
core organizing into sub folders 2019-05-23 14:00:49 -04:00
effect testing setting/getting the delayTime 2019-01-31 12:16:25 -05:00
event Add tests for Event and Part loop behavior when loop is false, 0 or 1 2019-07-08 13:47:09 -04:00
helper disposing the instance after use 2019-11-14 13:36:00 -05:00
html testing within a node context 2019-11-07 15:44:07 -05:00
instrument increasing threshold 2019-03-08 12:32:05 -05:00
signal organizing into sub folders 2019-05-23 14:00:49 -04:00
source removing old JS files 2019-06-19 10:18:43 -04:00
type organizing into sub folders 2019-05-23 14:00:49 -04:00
index.html invoke test with timeout 2018-05-18 18:03:58 -04:00
README.md only using karma test runner with headless chrome 2017-06-29 17:31:10 -04:00

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.