Tone.js/test/effect/Distortion.js

31 lines
648 B
JavaScript
Raw Normal View History

import Distortion from "Tone/effect/Distortion";
import Basic from "helper/Basic";
import EffectTests from "helper/EffectTests";
2015-08-26 14:29:35 +00:00
describe("Distortion", function(){
2015-08-26 14:29:35 +00:00
Basic(Distortion);
EffectTests(Distortion);
2015-08-26 14:29:35 +00:00
context("API", function(){
it("can pass in options in the constructor", function(){
var dist = new Distortion({
"distortion" : 0.2,
2015-08-26 14:29:35 +00:00
});
expect(dist.distortion).to.be.closeTo(0.2, 0.01);
dist.dispose();
});
2015-08-26 14:29:35 +00:00
it("can get/set the options", function(){
var dist = new Distortion();
dist.set({
"oversample" : "4x",
2015-08-26 14:29:35 +00:00
});
expect(dist.get().oversample).to.equal("4x");
dist.dispose();
2015-08-26 14:29:35 +00:00
});
});
2017-12-30 16:26:29 +00:00
});