add nitro player mocks

This commit is contained in:
Violet Caulfield
2026-02-21 00:40:38 -06:00
parent 4d23f94424
commit 09c8a4714d
2 changed files with 12 additions and 0 deletions

View File

@@ -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',
],

View File

@@ -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(),
})),
}))