diff --git a/test/tests/p5.Delay.js b/test/tests/p5.Delay.js new file mode 100644 index 00000000..efebbec1 --- /dev/null +++ b/test/tests/p5.Delay.js @@ -0,0 +1,25 @@ +define(['chai'], + function(chai) { + + var expect = chai.expect; + + describe('p5.Delay', function() { + + it('can be created and disposed', function() { + var delay = new p5.Delay(); + delay.dispose(); + }); + + it('has initial feedback value of 0.5', function(){ + var delay = new p5.Delay(); + expect(delay.feedback()).to.equal(0.5); + }); + + it('can set feedback', function(){ + var delay = new p5.Delay(); + delay.feedback(0.7); + expect(delay.feedback()).to.be.closeTo(0.7, 0.001); + }); + + }); +}); \ No newline at end of file