mirror of
https://github.com/Tonejs/Tone.js
synced 2024-12-29 04:53:10 +00:00
ed71d8141b
no longer using AMD (require.js) style imports, and beginning to move to es6 "import/export" statements everywhere.
30 lines
648 B
JavaScript
30 lines
648 B
JavaScript
import Distortion from "Tone/effect/Distortion";
|
|
import Basic from "helper/Basic";
|
|
import EffectTests from "helper/EffectTests";
|
|
|
|
describe("Distortion", function(){
|
|
|
|
Basic(Distortion);
|
|
EffectTests(Distortion);
|
|
|
|
context("API", function(){
|
|
|
|
it("can pass in options in the constructor", function(){
|
|
var dist = new Distortion({
|
|
"distortion" : 0.2,
|
|
});
|
|
expect(dist.distortion).to.be.closeTo(0.2, 0.01);
|
|
dist.dispose();
|
|
});
|
|
|
|
it("can get/set the options", function(){
|
|
var dist = new Distortion();
|
|
dist.set({
|
|
"oversample" : "4x",
|
|
});
|
|
expect(dist.get().oversample).to.equal("4x");
|
|
dist.dispose();
|
|
});
|
|
});
|
|
});
|
|
|