diff --git a/test/tests/Transport.js b/test/tests/Transport.js index 3cfc709c..6b98ca20 100644 --- a/test/tests/Transport.js +++ b/test/tests/Transport.js @@ -1,6 +1,7 @@ /* global it, describe, beforeEach, maxTimeout */ -define(["chai", "Tone/core/Transport", "tests/Core", "tests/Common", "Tone/core/Clock"], function(chai, Transport, Core, Test, Clock){ +define(["chai", "Tone/core/Transport", "tests/Core", "tests/Common", "Tone/core/Clock"], + function(chai, Transport, Core, Test, Clock){ var expect = chai.expect; describe("Tone.Clock", function(){ @@ -26,6 +27,15 @@ define(["chai", "Tone/core/Transport", "tests/Core", "tests/Common", "Tone/core/ done(); }); }); + + it("invokes the callback when stopped", function(done){ + Test.onlineContext(); + var clock = new Clock(0.5, function(){}); + clock.start(); + clock.stop("+0.5", function(){ + done(); + }); + }); }); describe("Transport.setBpm / getBpm", function(){