2015-08-26 14:29:35 +00:00
|
|
|
define(["Tone/effect/PingPongDelay", "helper/Basic", "helper/EffectTests"], function (PingPongDelay, Basic, EffectTests) {
|
|
|
|
|
|
|
|
describe("PingPongDelay", function(){
|
|
|
|
|
|
|
|
Basic(PingPongDelay);
|
|
|
|
EffectTests(PingPongDelay, 0.01);
|
|
|
|
|
|
|
|
context("API", function(){
|
|
|
|
|
2017-12-30 16:26:29 +00:00
|
|
|
it("can pass in options in the constructor", function(){
|
2015-08-26 14:29:35 +00:00
|
|
|
var pingPong = new PingPongDelay({
|
|
|
|
"delayTime" : 0.2,
|
|
|
|
});
|
|
|
|
expect(pingPong.delayTime.value).to.be.closeTo(0.2, 0.01);
|
|
|
|
pingPong.dispose();
|
|
|
|
});
|
|
|
|
|
2017-12-30 16:26:29 +00:00
|
|
|
it("can get/set the options", function(){
|
2015-08-26 14:29:35 +00:00
|
|
|
var pingPong = new PingPongDelay();
|
|
|
|
pingPong.set({
|
|
|
|
"delayTime" : 0.21,
|
|
|
|
});
|
|
|
|
expect(pingPong.get().delayTime).to.be.closeTo(0.21, 0.01);
|
|
|
|
pingPong.dispose();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
2017-12-30 16:26:29 +00:00
|
|
|
});
|