2019-01-27 18:05:20 +00:00
|
|
|
import BitCrusher from "Tone/effect/BitCrusher";
|
|
|
|
import Basic from "helper/Basic";
|
|
|
|
import EffectTests from "helper/EffectTests";
|
2015-08-26 14:29:35 +00:00
|
|
|
|
2019-01-27 18:05:20 +00:00
|
|
|
describe("BitCrusher", function(){
|
2015-08-26 14:29:35 +00:00
|
|
|
|
2019-01-27 18:05:20 +00:00
|
|
|
Basic(BitCrusher);
|
|
|
|
EffectTests(BitCrusher);
|
2015-08-26 14:29:35 +00:00
|
|
|
|
2019-01-27 18:05:20 +00:00
|
|
|
context("API", function(){
|
|
|
|
|
|
|
|
it("can pass in options in the constructor", function(){
|
|
|
|
var crusher = new BitCrusher({
|
|
|
|
"bits" : 3,
|
2015-08-26 14:29:35 +00:00
|
|
|
});
|
2019-01-27 18:05:20 +00:00
|
|
|
expect(crusher.bits).to.equal(3);
|
|
|
|
crusher.dispose();
|
|
|
|
});
|
2015-08-26 14:29:35 +00:00
|
|
|
|
2019-01-27 18:05:20 +00:00
|
|
|
it("can get/set the options", function(){
|
|
|
|
var crusher = new BitCrusher();
|
|
|
|
crusher.set({
|
|
|
|
"bits" : 5,
|
2015-08-26 14:29:35 +00:00
|
|
|
});
|
2019-01-27 18:05:20 +00:00
|
|
|
expect(crusher.get().bits).to.equal(5);
|
|
|
|
crusher.dispose();
|
2015-08-26 14:29:35 +00:00
|
|
|
});
|
|
|
|
});
|
2017-12-30 16:26:29 +00:00
|
|
|
});
|
2019-01-27 18:05:20 +00:00
|
|
|
|