Tone.js/test/core/TransportEvent.js

32 lines
780 B
JavaScript
Raw Normal View History

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