.. | ||
audio | ||
component | ||
control | ||
core | ||
deps | ||
effect | ||
event | ||
examples | ||
helper | ||
instrument | ||
signal | ||
source | ||
type | ||
.jshintrc | ||
index.html | ||
karmaTest.js | ||
README.md |
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.