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