Skip to content

Commit

Permalink
test: add expectation test for getOutputTimestamp() bug
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisguttandin committed Feb 23, 2024
1 parent 49eb250 commit 5ce6e42
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/expectation/safari/current/audio-context-constructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,21 @@ describe('audioContextConstructor', () => {
}, 500);
});
});

// Bug #198

describe('getOutputTimestamp()', () => {
it('should expose a wrong contextTime', function (done) {
this.timeout(0);

setTimeout(() => {
expect(audioContext.currentTime).to.above(9);
expect(audioContext.getOutputTimestamp().contextTime).to.below(1);
expect(audioContext.getOutputTimestamp().contextTime * audioContext.sampleRate).to.above(9);

done();
}, 10000);
});
});
});
});

0 comments on commit 5ce6e42

Please sign in to comment.