mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 08:38:00 +00:00
ed71d8141b
no longer using AMD (require.js) style imports, and beginning to move to es6 "import/export" statements everywhere.
30 lines
624 B
JavaScript
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();
|
|
});
|
|
});
|
|
});
|
|
|