UNPKG

@azgaar/tone

Version:

A fork of Web Audio framework for making interactive music in the browser.

13 lines 482 B
import { __awaiter } from "tslib"; import { expect } from "chai"; import { Offline } from "./Offline"; /** * Test that the output of the callback is a constant value */ export function ConstantOutput(callback, value, threshold = 0.01) { return __awaiter(this, void 0, void 0, function* () { const buffer = yield Offline(callback, 0.01, 1); expect(buffer.value()).to.be.closeTo(value, threshold); }); } //# sourceMappingURL=ConstantOutput.js.map