Tone.js/test/effect/Convolver.js

39 lines
801 B
JavaScript
Raw Normal View History

define(["Tone/effect/Convolver", "helper/Basic", "helper/EffectTests", "Tone/core/Buffer"],
function (Convolver, Basic, EffectTests, Buffer) {
describe("Effect", function(){
2015-08-28 03:02:08 +00:00
Basic(Convolver);
var ir = new Buffer();
2016-03-05 05:07:17 +00:00
var testFile = "./audio/sine.wav";
before(function(done){
2016-03-05 05:07:17 +00:00
ir.load(testFile, function(){
done();
});
});
2016-03-05 05:07:17 +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();
}
});
});
});
});
});