Tone.js/test
Yotam Mann cf31bb6bda end exponentialApproach with a linearRamp
this makes sure that the value ends at the correct value and time instead of continuously approaching.

also addresses https://bugs.chromium.org/p/chromium/issues/detail?id=990393&can=2&q=small%20timeConstant
2019-08-02 13:09:24 -04:00
..
audio testing polyphonic voice handling 2018-06-20 23:12:45 -04:00
component end exponentialApproach with a linearRamp 2019-08-02 13:09:24 -04:00
control testing that changing pattern length should update shuffle 2019-02-01 11:33:26 -05:00
core Tone.Disconnect Fix (#483) 2019-05-14 21:40:23 -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 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.