Tone.js/test
2019-02-01 11:24:35 -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 amd to es6 import/export 2019-01-27 13:05:20 -05:00
core removing rampTime from 'set' 2019-01-28 21:04:43 -05:00
effect testing setting/getting the delayTime 2019-01-31 12:16:25 -05:00
event amd to es6 import/export 2019-01-27 13:05:20 -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 adding get/set tests 2019-01-28 21:11:56 -05:00
signal testing case where no previous events are on the timeline 2019-02-01 10:47:35 -05:00
source amd to es6 import/export 2019-01-27 13:05:20 -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.