updating threshold

This commit is contained in:
Yotam Mann 2021-12-18 17:37:31 -05:00
parent d6a23a134c
commit aeaaa1e871

View file

@ -7,25 +7,29 @@ import { Oscillator } from "Tone/source";
import { Offline } from "test/helper/Offline"; import { Offline } from "test/helper/Offline";
describe("Chorus", () => { describe("Chorus", () => {
BasicTests(Chorus); BasicTests(Chorus);
EffectTests(Chorus); EffectTests(Chorus);
it("matches a file", () => { it("matches a file", () => {
return CompareToFile(() => { return CompareToFile(
const chorus = new Chorus().toDestination().start(); () => {
const osc = new Oscillator(220, "sawtooth").connect(chorus).start(); const chorus = new Chorus().toDestination().start();
}, "chorus.wav", 0.1); const osc = new Oscillator(220, "sawtooth")
.connect(chorus)
.start();
},
"chorus.wav",
0.25
);
}); });
context("API", () => { context("API", () => {
it("can pass in options in the constructor", () => { it("can pass in options in the constructor", () => {
const chorus = new Chorus({ const chorus = new Chorus({
frequency: 2, frequency: 2,
delayTime: 1, delayTime: 1,
depth: 0.4, depth: 0.4,
spread: 90 spread: 90,
}); });
expect(chorus.frequency.value).to.be.closeTo(2, 0.01); expect(chorus.frequency.value).to.be.closeTo(2, 0.01);
expect(chorus.delayTime).to.be.closeTo(1, 0.01); expect(chorus.delayTime).to.be.closeTo(1, 0.01);
@ -84,4 +88,3 @@ describe("Chorus", () => {
}); });
}); });
}); });