diff --git a/jest.config.js b/jest.config.js index 17c78898..532428c8 100644 --- a/jest.config.js +++ b/jest.config.js @@ -21,6 +21,7 @@ module.exports = { './jest/setup/nitro-fetch.ts', './jest/setup/nitro-image.ts', './jest/setup/nitro-ota.ts', + './jest/setup/nitro-player.ts', './tamagui.config.ts', './jest/setup/native-modules.ts', ], diff --git a/jest/setup/nitro-player.ts b/jest/setup/nitro-player.ts new file mode 100644 index 00000000..2e960ba3 --- /dev/null +++ b/jest/setup/nitro-player.ts @@ -0,0 +1,11 @@ +jest.mock('react-native-nitro-player', () => ({ + TrackPlayer: jest.fn().mockImplementation(() => ({ + play: jest.fn(), + pause: jest.fn(), + stop: jest.fn(), + configure: jest.fn(), + onChangeTrack: jest.fn(), + skipToNext: jest.fn(), + skipToPrevious: jest.fn(), + })), +}))