Tone.js/test/core/TransportEvent.js

27 lines
767 B
JavaScript
Raw Normal View History

2018-05-18 16:07:20 +00:00
define(["helper/Test", "Tone/core/TransportEvent", "Tone/core/Tone", "helper/Offline", "helper/PassAudio", "Tone/source/Oscillator", "Tone/core/AudioNode"],
function(Test, TransportEvent, Tone, Offline, PassAudio, Oscillator, AudioNode){
2017-12-30 16:26:29 +00:00
describe("TransportEvent", function(){
2017-12-30 16:26:29 +00:00
it("can be created and disposed", function(){
return Offline(function(Transport){
var event = new TransportEvent(Transport, {
"time" : 0
});
event.dispose();
Test.wasDisposed(event);
});
2017-12-30 16:26:29 +00:00
});
2017-12-30 16:26:29 +00:00
it("generates a unique event ID", function(){
return Offline(function(Transport){
var event = new TransportEvent(Transport, {
"time" : 0
});
expect(event.id).to.be.a("number");
event.dispose();
});
2017-12-30 16:26:29 +00:00
});
});
});