2018-05-18 16:07:20 +00:00
|
|
|
define(["helper/Test", "Tone/core/Tone"], function(Test, Tone){
|
2015-08-21 21:03:14 +00:00
|
|
|
|
2018-07-29 13:39:58 +00:00
|
|
|
// var testAudioContext = new Tone.Context();
|
|
|
|
|
2015-08-24 21:28:23 +00:00
|
|
|
return function(Constr, args){
|
2015-08-21 21:03:14 +00:00
|
|
|
|
|
|
|
context("Basic", function(){
|
|
|
|
|
2017-12-30 16:26:29 +00:00
|
|
|
it("can be created and disposed", function(){
|
2015-08-24 21:28:23 +00:00
|
|
|
var instance = new Constr(args);
|
2015-08-21 21:03:14 +00:00
|
|
|
instance.dispose();
|
|
|
|
Test.wasDisposed(instance);
|
|
|
|
});
|
|
|
|
|
2017-12-30 16:26:29 +00:00
|
|
|
it("extends Tone", function(){
|
2015-08-24 21:28:23 +00:00
|
|
|
var instance = new Constr(args);
|
2015-08-21 21:03:14 +00:00
|
|
|
expect(instance).to.be.an.instanceof(Tone);
|
|
|
|
instance.dispose();
|
|
|
|
});
|
|
|
|
|
2018-07-29 13:39:58 +00:00
|
|
|
/*it("can specify the AudioContext", function(){
|
|
|
|
var instance = new Constr(testAudioContext, args);
|
|
|
|
expect(instance.context).to.equal(testAudioContext);
|
|
|
|
instance.dispose();
|
|
|
|
});*/
|
|
|
|
|
2015-08-21 21:03:14 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
};
|
2017-12-30 16:26:29 +00:00
|
|
|
});
|