Move jest-setup.js to ./test folder
This commit is contained in:
@@ -1,2 +0,0 @@
|
|||||||
// Import Jest Native matchers
|
|
||||||
import '@testing-library/jest-native/extend-expect'
|
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
preset: '@testing-library/react-native',
|
preset: '@testing-library/react-native',
|
||||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
|
||||||
setupFilesAfterEnv: ['./jest-setup.js'],
|
setupFilesAfterEnv: ['./test/jest-setup.js'],
|
||||||
transformIgnorePatterns: [
|
transformIgnorePatterns: [
|
||||||
'node_modules/(?!((jest-)?react-native(-.*)?|@react-native(-community)?)/)',
|
'node_modules/(?!((jest-)?react-native(-.*)?|@react-native(-community)?)/)',
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -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) : ''),
|
||||||
|
}),
|
||||||
|
}))
|
||||||
Reference in New Issue
Block a user