Skip to content

Commit 1012647

Browse files
committed
(Chore) : used done callback to make sure the test only finishes once the timer finishe
Signed-off-by: Abhijay Jain <[email protected]>
1 parent 61c6d98 commit 1012647

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/tests/p5.Gain.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe('p5.Gain', function () {
3636
gain.connect(filter);
3737
gain.connect(filter.input);
3838
});
39-
it('can set the output level of gain Node', () => {
39+
it('can set the output level of gain node', (done) => {
4040
let osc = new p5.Oscillator('sine');
4141
let mainGainNode = new p5.Gain();
4242
let amplitude = new p5.Amplitude();
@@ -51,6 +51,7 @@ describe('p5.Gain', function () {
5151
mainGainNode.amp(0.5);
5252
setTimeout(function () {
5353
expect(amplitude.getLevel()).to.be.closeTo(0.25, 0.125);
54+
done();
5455
}, 100);
5556
});
5657
it('can disconnect', function () {

0 commit comments

Comments
 (0)