2015-08-26 14:29:35 +00:00
|
|
|
define(["Tone/effect/Effect", "Tone/effect/FeedbackEffect", "helper/Basic"], function (Effect, FeedbackEffect, Basic) {
|
|
|
|
describe("FeedbackEffect", function(){
|
|
|
|
Basic(FeedbackEffect);
|
|
|
|
|
|
|
|
context("API", function(){
|
|
|
|
|
2017-12-30 16:26:29 +00:00
|
|
|
it("extends Effect", function(){
|
2015-08-26 14:29:35 +00:00
|
|
|
var feedbackEffect = new FeedbackEffect();
|
|
|
|
expect(feedbackEffect).to.be.instanceOf(Effect);
|
|
|
|
feedbackEffect.dispose();
|
|
|
|
});
|
|
|
|
|
2017-12-30 16:26:29 +00:00
|
|
|
it("has a feedback signal", function(){
|
2015-08-26 14:29:35 +00:00
|
|
|
var feedbackEffect = new FeedbackEffect();
|
|
|
|
expect(feedbackEffect).to.have.property("feedback");
|
|
|
|
feedbackEffect.dispose();
|
|
|
|
});
|
|
|
|
|
2017-12-30 16:26:29 +00:00
|
|
|
it("can set the feedback amount", function(){
|
2015-08-26 14:29:35 +00:00
|
|
|
var feedbackEffect = new FeedbackEffect();
|
|
|
|
feedbackEffect.feedback.value = 1;
|
|
|
|
expect(feedbackEffect.feedback.value).to.be.closeTo(1, 0.001);
|
|
|
|
feedbackEffect.feedback.value = 0.22;
|
|
|
|
expect(feedbackEffect.feedback.value).to.be.closeTo(0.22, 0.001);
|
|
|
|
feedbackEffect.dispose();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
2017-12-30 16:26:29 +00:00
|
|
|
});
|