forked from Ivasoft/mattermost-mobile
[Gekidou] Refactor storage layer (#5471)
* Refactored storage layer - in progress * Refactored DatabaseManager & Operators * Renamed isRecordAppEqualToRaw to isRecordInfoEqualToRaw * Review feedback * Update app/database/models/app/info.ts Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com> * Update app/database/models/server/my_team.ts Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com> Co-authored-by: Avinash Lingaloo <> Co-authored-by: Miguel Alatzar <migbot@users.noreply.github.com>
This commit is contained in:
@@ -11,14 +11,12 @@ require('react-native-reanimated/lib/reanimated2/jestUtils').setUpTests();
|
||||
|
||||
require('isomorphic-fetch');
|
||||
|
||||
const mockImpl = new MockAsyncStorage();
|
||||
jest.mock('@react-native-community/async-storage', () => mockImpl);
|
||||
|
||||
// @ts-expect-error no window exist in global
|
||||
global.window = {};
|
||||
|
||||
/* eslint-disable no-console */
|
||||
|
||||
jest.mock('@react-native-community/async-storage', () => new MockAsyncStorage());
|
||||
jest.mock('@database/manager');
|
||||
jest.doMock('react-native', () => {
|
||||
const {
|
||||
Platform,
|
||||
@@ -89,6 +87,15 @@ jest.doMock('react-native', () => {
|
||||
Appearance: {
|
||||
getColorScheme: jest.fn().mockReturnValue('light'),
|
||||
},
|
||||
MattermostManaged: {
|
||||
getConstants: () => ({
|
||||
appGroupIdentifier: 'group.mattermost.rnbeta',
|
||||
appGroupSharedDirectory: {
|
||||
sharedDirectory: '',
|
||||
databasePath: '',
|
||||
},
|
||||
}),
|
||||
},
|
||||
};
|
||||
|
||||
const Linking = {
|
||||
|
||||
Reference in New Issue
Block a user