mirror of
https://github.com/Tonejs/Tone.js
synced 2024-12-27 03:53:07 +00:00
fix failing tests to use same (corrected) currentTime as OneShotSource
This commit is contained in:
parent
6decb02d9a
commit
6700a3c5f5
2 changed files with 2 additions and 2 deletions
|
@ -152,7 +152,7 @@ describe("ToneConstantSource", () => {
|
|||
expect(source.getStateAtTime(0)).to.equal("stopped");
|
||||
expect(source.getStateAtTime(currentTime)).to.equal("started");
|
||||
setTimeout(() => {
|
||||
currentTime = source.context.currentTime;
|
||||
currentTime = source.now();
|
||||
source.stop(0);
|
||||
expect(source.getStateAtTime(currentTime + 0.01)).to.equal("stopped");
|
||||
source.dispose();
|
||||
|
|
|
@ -191,7 +191,7 @@ describe("ToneOscillatorNode", () => {
|
|||
expect(osc.getStateAtTime(0)).to.equal("stopped");
|
||||
expect(osc.getStateAtTime(currentTime)).to.equal("started");
|
||||
setTimeout(() => {
|
||||
currentTime = osc.context.currentTime;
|
||||
currentTime = osc.now();
|
||||
osc.stop(0);
|
||||
expect(osc.getStateAtTime(currentTime + 0.01)).to.equal("stopped");
|
||||
osc.dispose();
|
||||
|
|
Loading…
Reference in a new issue