mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2026-05-05 22:25:57 -04:00
* Get a few mocks working in __mocks__ folder * Move more mocks into __mocks__ * Move mocks * Move zustand mock * Add more mocks to __mocks__ * More mocks * Move more files to __mocks__ and audit existing mocks * Mock react navigation in __mocks__ * Restore test to help with imports after jest env torn down * Add fake timer to integration test with userEvent * Add RN paper mock
21 lines
537 B
TypeScript
21 lines
537 B
TypeScript
import mockFaker from "tests/helpers/faker";
|
|
|
|
export const nativeInterface = jest.fn( );
|
|
export const CameraRoll = {
|
|
getPhotos: jest.fn( ( ) => ( {
|
|
page_info: {
|
|
end_cursor: jest.fn( ),
|
|
has_next_page: false
|
|
},
|
|
edges: [
|
|
// This expexcts something like
|
|
// { node: photo }
|
|
]
|
|
} ) ),
|
|
getAlbums: jest.fn( ( ) => ( {
|
|
// Expecting album titles as keys and photo counts as values
|
|
// "My Amazing album": 12
|
|
} ) ),
|
|
save: jest.fn( ( _uri, _options = {} ) => mockFaker.system.filePath( ) )
|
|
};
|