Tone.js/test
2016-09-25 12:35:57 -04:00
..
audio using rest of effects tests on Convolver 2016-08-09 14:25:20 -04:00
component Revert "making envelope tests not start on 0" 2016-09-24 10:03:26 -04:00
control CtrlInterpolate no longer interpolates notes 2016-04-18 02:07:24 -04:00
core start/stop/pause callbacks are invoked at the moment they occur 2016-09-24 11:48:28 -04:00
deps cross checking note conversions against teoria 2015-08-16 22:17:59 -04:00
effect removing effects test 2016-08-09 16:47:14 -04:00
event tests accurately reset the PPQ each time 2016-04-18 02:04:48 -04:00
helper disconnects from a specific node 2016-07-06 23:39:06 -04:00
instrument can set the buffer 2016-07-20 15:42:55 -04:00
signal testing LFO as value 2016-09-18 19:28:20 -04:00
source more accurate handling of syncing to Transport start with an offset / duration 2016-09-25 12:35:57 -04:00
type additional TransportTime validations 2016-09-20 18:35:28 -04:00
.jshintrc adding "before" and "context" 2015-08-18 17:08:48 -04:00
index.html renamed test html file 2015-08-17 01:04:04 -04:00
karmaTest.js adding karma testing files and hooks 2016-03-04 16:25:44 -05:00
README.md updated testing README 2016-03-29 19:42:31 -04:00

I am currently using two test runners: mocha and karma + mocha.

From within the gulp folder, run gulp browser-test to collect all of the files, launch a local server and run the tests. If you run gulp karma-test, the tests can be configured to run across multiple browsers simultaneously.

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.