Tone.js/test/helper/Basic.js

23 lines
446 B
JavaScript
Raw Normal View History

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
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();
});
});
};
2017-12-30 16:26:29 +00:00
});