Tone.js/test/instrument/Instrument.js
tambien ed71d8141b amd to es6 import/export
no longer using AMD (require.js) style imports, and beginning to move to es6 "import/export" statements everywhere.
2019-01-27 13:05:20 -05:00

28 lines
561 B
JavaScript

import Instrument from "Tone/instrument/Instrument";
import Basic from "helper/Basic";
describe("Instrument", function(){
Basic(Instrument);
context("API", function(){
it("can be constructed with an options object", function(){
var instr = new Instrument({
"volume" : -12
});
expect(instr.volume.value).to.be.closeTo(-12, 0.1);
instr.dispose();
});
it("can get/set attributes", function(){
var instr = new Instrument();
instr.set({
"volume" : 2
});
expect(instr.get().volume).to.be.closeTo(2, 0.1);
});
});
});