Tone.js/test
2019-02-02 13:19:49 -05:00
..
audio testing polyphonic voice handling 2018-06-20 23:12:45 -04:00
component test get/set exponent 2019-02-01 11:24:35 -05:00
control testing that changing pattern length should update shuffle 2019-02-01 11:33:26 -05:00
core removing log 2019-02-02 13:19:49 -05:00
effect testing setting/getting the delayTime 2019-01-31 12:16:25 -05:00
event testing that pattern reports value correctly 2019-02-01 12:20:34 -05:00
helper using Tone.connect for connections with native nodes 2019-01-28 11:02:15 -05:00
html removing old example tests 2019-01-08 22:22:09 -05:00
instrument testing polyphonic triggerAttackRelease API 2019-02-01 12:02:03 -05:00
signal tick signal does a setValueAtTime initially 2019-02-01 11:36:25 -05:00
source should have an empty partials array 2019-02-01 11:49:47 -05:00
type amd to es6 import/export 2019-01-27 13:05:20 -05: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.