From 6dd821e81e215a45316a97677c98f1d125682d9c Mon Sep 17 00:00:00 2001 From: therewasaguy Date: Sat, 28 Jan 2017 18:01:22 -0500 Subject: [PATCH] add test/tests/p5.Delay --- test/tests/p5.Delay.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 test/tests/p5.Delay.js 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