Tone.js/test
Jack Anderson 1fb225383e no insignificant zeroes in barsBeatsSixteenths (#250)
* no insignificant zeroes in barsBeatsSixteenths

- fixes #246

* restore bpm to orig val in trailing zero test
2017-08-08 10:54:47 -04:00
..
audio using rest of effects tests on Convolver 2016-08-09 14:25:20 -04:00
component removing min/maxDecibels and returnType test 2017-07-08 11:21:39 -04:00
control applying defaults API to control classes 2017-04-25 22:37:01 -04:00
core testing create and dispose 2017-07-05 13:59:24 -04:00
deps removing unused files from test deps 2017-04-30 15:04:28 -04:00
effect removing convolver effects tests that throw an error when running in TravisCI 2016-11-22 10:46:26 -08:00
event testing playbackRate and humanize 2017-07-06 10:32:50 -04:00
examples throw error if URL doesn't exist 2017-03-26 15:21:45 -04:00
helper increasing timeout length 2017-06-30 14:34:01 -04:00
instrument testing releaseAll 2017-07-06 13:02:17 -04:00
signal testing that it outputs a signal 2017-05-28 20:47:47 -04:00
source coverage test for modulationType 2017-06-29 14:20:34 -04:00
type no insignificant zeroes in barsBeatsSixteenths (#250) 2017-08-08 10:54:47 -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 test all examples for execution errors 2017-03-26 14:51:25 -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.