Tone.js/test
tambien 41183dfe2e removing logging from test
whoops
[skip ci]
2019-01-09 18:34:47 -05:00
..
audio testing polyphonic voice handling 2018-06-20 23:12:45 -04:00
component get the frequency response curve 2018-12-28 16:07:39 -05:00
control linting 2017-12-30 11:26:29 -05:00
core correcting get tests with oscillator 2019-01-08 00:11:01 -05:00
effect testing setting convolver buffer twice 2018-10-21 21:28:26 -04:00
event removing logging from test 2019-01-09 18:34:47 -05:00
helper no more online tests 2018-12-12 20:33:09 -05:00
html removing old example tests 2019-01-08 22:22:09 -05:00
instrument expanding testing threshold 2018-12-12 20:41:19 -05:00
signal removing signal proxies 2018-06-09 12:55:29 -04:00
source closes the stream before reopening it 2019-01-08 11:26:57 -05:00
type moving deps to node_modules 2018-05-19 12:17:23 -04: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.