Tone.js/test
2018-05-25 18:24:45 -04:00
..
audio additional NoiseSynth tests 2018-04-25 10:29:07 -04:00
component Merge branch 'dev' into webpack 2018-05-18 19:22:20 -04:00
control linting 2017-12-30 11:26:29 -05:00
core testing for Promise by checking for 'then' 2018-05-19 13:11:11 -04:00
effect testing for Promise by checking for 'then' 2018-05-19 13:11:11 -04:00
event pointing at correct helper/Test 2018-05-18 12:07:20 -04:00
examples ignoring example tests for now 2018-05-19 11:29:33 -04:00
helper verifying that all sources can restart 2018-05-20 17:36:17 -04:00
instrument Merge branch 'dev' into webpack 2018-05-18 19:22:20 -04:00
signal only disconnecting when signal is started 2018-05-25 18:24:45 -04:00
source testing for Promise by checking for 'then' 2018-05-19 13:11:11 -04: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.