Tone.js/test
tboie bcd22b0463 #473 (#478)
Fixes Part loop toggle
2019-04-12 10:44:24 -04:00
..
audio testing polyphonic voice handling 2018-06-20 23:12:45 -04:00
component #471 (#472) 2019-04-04 15:10:03 -04:00
control testing that changing pattern length should update shuffle 2019-02-01 11:33:26 -05:00
core shim to ensure that AudioNode.connect returns the destination node 2019-02-02 14:24:51 -05:00
effect testing setting/getting the delayTime 2019-01-31 12:16:25 -05:00
event #473 (#478) 2019-04-12 10:44:24 -04:00
helper Added option to silence both loggers the context (#453) 2019-03-06 14:59:17 -05:00
html removing old example tests 2019-01-08 22:22:09 -05:00
instrument increasing threshold 2019-03-08 12:32:05 -05:00
signal increase test thresholds 2019-02-04 13:09:48 -05:00
source passes in the player to the callback 2019-03-25 11:53:57 -07:00
type increase tick threshold 2019-02-04 13:20:29 -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.