Tone.js/test/helper/ConstantOutput.js
2017-12-30 11:26:29 -05:00

10 lines
283 B
JavaScript

define(["helper/Offline"], function (Offline) {
return function(callback, value, threshold){
if (typeof threshold === "undefined"){
threshold = 0.01;
}
return Offline(callback).then(function(buffer){
expect(buffer.value()).to.be.closeTo(value, threshold);
});
};
});