Tone.js/test/effect/PingPongDelay.js

31 lines
716 B
JavaScript
Raw Normal View History

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