Tone.js/test/effect/Convolver.js

44 lines
873 B
JavaScript
Raw Normal View History

define(["Tone/effect/Convolver", "helper/Basic", "helper/EffectTests", "Tone/core/Buffer"],
function (Convolver, Basic, EffectTests, Buffer) {
if (window.__karma__){
Buffer.baseUrl = "/base/test/";
}
2016-08-09 18:59:38 +00:00
describe("Convolver", function(){
2015-08-28 03:02:08 +00:00
Basic(Convolver);
var ir = new Buffer();
var testFile = "./audio/sineStereo.wav";
2016-03-05 05:07:17 +00:00
before(function(done){
2016-03-05 05:07:17 +00:00
ir.load(testFile, function(){
done();
});
});
2016-08-09 20:47:14 +00:00
// EffectTests(Convolver, ir);
context("API", function(){
2015-08-28 03:02:08 +00:00
it ("can pass in options in the constructor", function(){
var convolver = new Convolver({
2016-03-05 05:07:17 +00:00
"url" : testFile,
});
convolver.dispose();
});
2015-08-28 03:02:08 +00:00
it ("invokes the onload function when loaded", function(done){
var convolver = new Convolver({
2016-03-05 05:07:17 +00:00
"url" : testFile,
2015-08-28 03:02:08 +00:00
"onload" : function(){
convolver.dispose();
done();
}
});
});
});
});
});