-
Notifications
You must be signed in to change notification settings - Fork 978
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using web-test-runner for tests, updating import paths (#1242)
* WIP moving tests to web-test-runner * updating thresholds * Adding file extensions * Testing integrations * linting * fixing dep * moving back to root dir * prettier all of the files * updating eslint rules to use with prettier * remove import package * moving tsignore around * removing unneeded ignores * all tests run on puppeteer, no need for testing guards * linting * import type syntax * cleaning up * Update package.json
- Loading branch information
Showing
373 changed files
with
19,461 additions
and
16,387 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
export * from "./core/index"; | ||
export * from "./source/index"; | ||
export * from "./signal/index"; | ||
export * from "./instrument/index"; | ||
export * from "./event/index"; | ||
export * from "./effect/index"; | ||
export * from "./component/index"; | ||
export * from "./core/index.js"; | ||
export * from "./source/index.js"; | ||
export * from "./signal/index.js"; | ||
export * from "./instrument/index.js"; | ||
export * from "./event/index.js"; | ||
export * from "./effect/index.js"; | ||
export * from "./component/index.js"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,29 @@ | ||
import { expect } from "chai"; | ||
import { BasicTests, warns } from "test/helper/Basic"; | ||
import { PassAudio } from "test/helper/PassAudio"; | ||
import { ONLINE_TESTING } from "test/helper/Supports"; | ||
import { Signal } from "Tone/signal/Signal"; | ||
import { DCMeter } from "./DCMeter"; | ||
import { BasicTests, warns } from "../../../test/helper/Basic.js"; | ||
import { PassAudio } from "../../../test/helper/PassAudio.js"; | ||
import { Signal } from "../../signal/Signal.js"; | ||
import { DCMeter } from "./DCMeter.js"; | ||
|
||
describe("DCMeter", () => { | ||
|
||
BasicTests(DCMeter); | ||
|
||
context("DCMetering", () => { | ||
|
||
it("passes the audio through", () => { | ||
return PassAudio((input) => { | ||
const meter = new DCMeter().toDestination(); | ||
input.connect(meter); | ||
}); | ||
}); | ||
|
||
if (ONLINE_TESTING) { | ||
it("can get the rms level of the incoming signal", (done) => { | ||
const meter = new DCMeter(); | ||
const osc = new Signal(2).connect(meter); | ||
setTimeout(() => { | ||
expect(meter.getValue()).to.be.closeTo(2, 0.1); | ||
meter.dispose(); | ||
osc.dispose(); | ||
done(); | ||
}, 400); | ||
}); | ||
} | ||
it("can get the rms level of the incoming signal", (done) => { | ||
const meter = new DCMeter(); | ||
const osc = new Signal(2).connect(meter); | ||
setTimeout(() => { | ||
expect(meter.getValue()).to.be.closeTo(2, 0.1); | ||
meter.dispose(); | ||
osc.dispose(); | ||
done(); | ||
}, 400); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.