scratch-audio/test/__mocks__/AudioContext.js
2018-06-08 12:39:29 -04:00

20 lines
433 B
JavaScript

const AudioNodeMock = require('./AudioNode');
const AudioParamMock = require('./AudioParam');
class AudioContextMock {
createGain () {
return new AudioNodeMock({
gain: new AudioParamMock({
default: 1,
min: -3,
max: 3
})
});
}
createChannelMerger () {
return new AudioNodeMock();
}
}
module.exports = AudioContextMock;