Testing A Library That Uses The Web Audio API With Mocha & Chai
问题 I am building a library which uses the web audio api(ToneJS to be more specific). I have tried using jsdom, mocha-jsdom with no success. I get this error - node_modules/tone/build/Tone.js:3869 this.input = this.output = this._gainNode = this.context.createGain(); Which makes sense and tells me that i need to use an environment with a context. I'm not even sure how i should setup the tests for my project. How should i setup a test environment correctly for my project? 回答1: I would suggest to