Tone.js/test/test.js
Yotam Mann cc95ee6caf instrument tests
fixed dispose methods bc of tests.
2014-09-09 15:30:36 -04:00

38 lines
No EOL
894 B
JavaScript

require.config({
baseUrl:"./",
paths : {
"Tone" : "../Tone",
"chai" : "./testDeps/chai",
"Recorder" : "./testDeps/recorder"
},
shim : {
"Recorder" : {
exports : "Recorder"
}
}
});
var recorderDelay = 0.5;
var recorderDuration = 0.1;
var maxTimeout = 1000;
function wasDisposed(obj, expect){
for (var prop in obj){
var member = obj[prop];
if (typeof member !== "function" &&
typeof member !== "string" &&
typeof member !== "number" &&
typeof member !== "boolean" &&
!(member instanceof AudioContext)){
expect(obj[prop]).to.equal(null);
}
}
}
var allTests = ["tests/Core", "tests/Timing", "tests/Signal", "tests/SignalComparison",
"tests/SignalMath", "tests/Transport", "tests/Sources", "tests/Components", "tests/Effect", "tests/Instruments"];
// var allTests = ["tests/Core", "tests/Instruments"];
require(allTests, function(){
mocha.run();
});