Move jest-setup.js to ./test folder

This commit is contained in:
MariaZ
2022-09-20 12:37:13 +02:00
parent 5f61f37d2f
commit 82b6a6b603
3 changed files with 9 additions and 3 deletions
-2
View File
@@ -1,2 +0,0 @@
// Import Jest Native matchers
import '@testing-library/jest-native/extend-expect'
+1 -1
View File
@@ -1,7 +1,7 @@
module.exports = {
preset: '@testing-library/react-native',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
setupFilesAfterEnv: ['./jest-setup.js'],
setupFilesAfterEnv: ['./test/jest-setup.js'],
transformIgnorePatterns: [
'node_modules/(?!((jest-)?react-native(-.*)?|@react-native(-community)?)/)',
],
+8
View File
@@ -0,0 +1,8 @@
// Import Jest Native matchers
import '@testing-library/jest-native/extend-expect'
jest.mock('react-i18next', () => ({
useTranslation: () => ({
t: (str, options) => str + (options ? JSON.stringify(options) : ''),
}),
}))