Tone.js/test/helper/ConstantOutput.js

10 lines
282 B
JavaScript
Raw Normal View History

2017-02-20 21:40:41 +00:00
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);
});
};
});