Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let connectionSpy = test.stub(Connection, 'create').callsFake(function(options) {
let sound = BaseSound.create(Object.assign({}, dummyOps, options));
next(() => sound.trigger('audio-load-error'));
return sound;
});
let connectionSpy = test.stub(Connection, 'create').callsFake(function(options) {
let sound = BaseSound.create(Object.assign({}, dummyOps, options));
test.stub(sound, 'play').callsFake(() => sound.trigger('audio-played'));
test.stub(sound, 'pause').callsFake(() => sound.trigger('audio-paused'));
next(() => sound.trigger('audio-ready'));
return sound;
});