clock onended test

This commit is contained in:
Yotam Mann 2015-01-04 22:55:04 -05:00
parent 3c2d962715
commit 1ad17e5021

View file

@ -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(){