Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
juanchoperezj committed May 3, 2024
1 parent 14d2694 commit 2088b36
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions __mocks__/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { dir } from 'console';

Check warning on line 1 in __mocks__/index.js

View workflow job for this annotation

GitHub Actions / lint

'dir' is defined but never used
import { init } from 'i18next';

Check warning on line 2 in __mocks__/index.js

View workflow job for this annotation

GitHub Actions / lint

'init' is defined but never used
import mockRNDeviceInfo from 'react-native-device-info/jest/react-native-device-info-mock';

jest.mock('react-native-device-info', () => mockRNDeviceInfo);
Expand Down Expand Up @@ -41,4 +43,10 @@ jest.mock('i18next', () => ({
const enFile = jest.requireActual('../src/localization/resources/en.json');
return stringKey.split('.').reduce((result, key) => result[key], enFile);
},
use: () => ({
language: 'en',
changeLanguage: jest.fn(),
init: jest.fn(),
}),
dir: jest.fn().mockReturnValue('ltr'),
}));

0 comments on commit 2088b36

Please sign in to comment.