Я пытаюсь проверить реагирующие компоненты, которые используют Tonejs. Сбой при попытке создать объект Synth.
Я уже пробовал указывать параметры (конверты и т. Д.), Ничего не помогло.
Проблема в том, что webaudioAPI недоступен в nodejs?
it('create Synth', () => {
const synth = new Tone.Synth().toMaster();
});
TypeError: Cannot read property 'createGain' of null
at new createGain (node_modules/tone/build/webpack:/Tone/Tone/core/Gain.js:23:1)
at new t.Volume (node_modules/tone/build/webpack:/Tone/Tone/component/Volume.js:25:1)
at t.Synth.t.Instrument [as constructor] (node_modules/tone/build/webpack:/Tone/Tone/instrument/Instrument.js:22:1)
at t.Synth.call [as constructor] (node_modules/tone/build/webpack:/Tone/Tone/instrument/Monophonic.js:18:1)
at new call (node_modules/tone/build/webpack:/Tone/Tone/instrument/Synth.js:23:1)
at Object.<anonymous>.it (src/App.test.tsx:15:17)