2019-01-27 18:05:20 +00:00
|
|
|
import Test from "helper/Test";
|
|
|
|
import Tone from "Tone/core/Tone";
|
2015-08-21 21:03:14 +00:00
|
|
|
|
2019-01-27 18:05:20 +00:00
|
|
|
// var testAudioContext = new Tone.Context();
|
2018-07-29 13:39:58 +00:00
|
|
|
|
2019-01-27 18:05:20 +00:00
|
|
|
export default function(Constr, args){
|
2015-08-21 21:03:14 +00:00
|
|
|
|
2019-01-27 18:05:20 +00:00
|
|
|
context("Basic", function(){
|
2015-08-21 21:03:14 +00:00
|
|
|
|
2019-01-27 18:05:20 +00:00
|
|
|
it("can be created and disposed", function(){
|
|
|
|
var instance = new Constr(args);
|
|
|
|
instance.dispose();
|
|
|
|
Test.wasDisposed(instance);
|
|
|
|
});
|
|
|
|
|
|
|
|
it("extends Tone", function(){
|
|
|
|
var instance = new Constr(args);
|
|
|
|
expect(instance).to.be.an.instanceof(Tone);
|
|
|
|
instance.dispose();
|
|
|
|
});
|
2015-08-21 21:03:14 +00:00
|
|
|
|
2019-01-27 18:05:20 +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
|
|
|
|
2019-01-27 18:05:20 +00:00
|
|
|
});
|
2018-07-29 13:39:58 +00:00
|
|
|
|
2019-01-27 18:05:20 +00:00
|
|
|
}
|
2015-08-21 21:03:14 +00:00
|
|
|
|