c66c453e95
* Added 'type' property to Tone.Meter that accepts 'peak' or 'rms' and defaults to 'rms'. Calculation methods + sources added to Tone.Meter. Tests added to Tone.Meter + assertion sources. * Fixed a number of formatting issues * more formatting fixes * Formatting for CI * fixed variable names * Updated to use existing gainToDb method. * Removed tests of removed method. * Removed whitespaces and tabs. * Moved Supports.ONLINE_TESTING to original position * Moded Supports.ONLINE_TESTING to top |
||
---|---|---|
.. | ||
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 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.