Tone.js/test
2017-12-30 00:30:52 -05:00
..
audio using rest of effects tests on Convolver 2016-08-09 14:25:20 -04:00
component only testing when equal power panning is supported 2017-12-29 21:37:42 -05:00
control applying defaults API to control classes 2017-04-25 22:37:01 -04:00
core static fromUrl method. 2017-12-30 00:06:53 -05:00
deps adding babel-polyfill for testing older browsers 2017-12-29 21:44:10 -05:00
effect testing AutoPanner syncing/unsyncing 2017-12-29 14:05:34 -05:00
event define loopStart/End, subdivision and interval in terms of seconds 2017-12-16 14:23:08 -05:00
examples don't run example tests on older safari 2017-12-29 23:15:40 -05:00
helper Revert "using babel-polyfill" 2017-12-29 23:34:44 -05:00
instrument test validating using Tone.Frequency into triggerAttack 2017-12-27 17:41:10 -05:00
signal removing TimelineSignal 2017-12-29 20:41:49 -05:00
source ignoring UserMedia tests on Safari 2017-12-28 18:44:14 -05:00
type increasing Midi conversion tests 2017-12-29 13:14:02 -05:00
.jshintrc adding "before" and "context" 2015-08-18 17:08:48 -04:00
index.html silence version logging in tests 2017-11-29 15:23:20 -05:00
karmaTest.js adding polyfill 2017-12-30 00:30:52 -05: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.