UNPKG

470 BJavaScriptView Raw
1// StartAudioContext assumes that we are in a window/document setting and messes with the unit
2// tests, this is our own version just checking to see if we have a global document to listen
3// to before we even try to "start" it. Our test api audio context is started by default.
4const StartAudioContext = require('startaudiocontext');
5
6module.exports = function (context) {
7 if (typeof document !== 'undefined') {
8 return StartAudioContext(context);
9 }
10};