Tone.js/test/effect/BitCrusher.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

30 lines
624 B
JavaScript

import BitCrusher from "Tone/effect/BitCrusher";
import Basic from "helper/Basic";
import EffectTests from "helper/EffectTests";
describe("BitCrusher", function(){
Basic(BitCrusher);
EffectTests(BitCrusher);
context("API", function(){
it("can pass in options in the constructor", function(){
var crusher = new BitCrusher({
"bits" : 3,
});
expect(crusher.bits).to.equal(3);
crusher.dispose();
});
it("can get/set the options", function(){
var crusher = new BitCrusher();
crusher.set({
"bits" : 5,
});
expect(crusher.get().bits).to.equal(5);
crusher.dispose();
});
});
});