mirror of
https://github.com/scratchfoundation/scratch-audio.git
synced 2024-12-22 05:53:43 -05:00
Fix broken tests (mock change for effects and plan audioengine)
This commit is contained in:
parent
5b693f6708
commit
7f2b9786ee
2 changed files with 7 additions and 0 deletions
|
@ -6,6 +6,7 @@ const {AudioContext} = require('web-audio-test-api');
|
||||||
tap.test('AudioEngine', t => {
|
tap.test('AudioEngine', t => {
|
||||||
const audioEngine = new AudioEngine(new AudioContext());
|
const audioEngine = new AudioEngine(new AudioContext());
|
||||||
|
|
||||||
|
t.plan(1);
|
||||||
t.deepEqual(audioEngine.inputNode.toJSON(), {
|
t.deepEqual(audioEngine.inputNode.toJSON(), {
|
||||||
gain: {
|
gain: {
|
||||||
inputs: [],
|
inputs: [],
|
||||||
|
|
|
@ -2,6 +2,12 @@ class AudioParamMock {
|
||||||
setTargetAtTime (value /* , start, stop */) {
|
setTargetAtTime (value /* , start, stop */) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
setValueAtTime (value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
linearRampToValueAtTime (value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = AudioParamMock;
|
module.exports = AudioParamMock;
|
||||||
|
|
Loading…
Reference in a new issue