How to use the react-native-sound.mockReset function in react-native-sound

To help you get started, we’ve selected a few react-native-sound examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github flarocca / react-native-music-player-service / __tests__ / src / MusicPlayerService.Tests.js View on Github external
beforeEach(() => {
  Sound.mockReset();
  Sound.prototype.play.mockClear();
  Sound.prototype.pause.mockClear();
  Sound.prototype.stop.mockClear();
  Sound.prototype.release.mockClear();

  MusicControl.on.mockClear();
  MusicControl.enableControl.mockClear();
  MusicControl.enableBackgroundMode.mockClear();
  MusicControl.setNowPlaying.mockClear();
  MusicControl.updatePlayback.mockClear();
});