Skip to content

Commit

Permalink
Update testing-library setup
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesdemers committed Dec 8, 2023
1 parent c4ceaf5 commit ae3efaa
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions template/jest-setup.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'reflect-metadata';
import { jest } from '@jest/globals';
import mockRNCNetInfo from '@react-native-community/netinfo/jest/netinfo-mock.js';
import mockSafeAreaContext from 'react-native-safe-area-context/jest/mock';
import mockDeviceInfo from 'react-native-device-info/jest/react-native-device-info-mock';
Expand Down
2 changes: 1 addition & 1 deletion template/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
preset: 'react-native',
setupFiles: ['./jest-setup.js'],
setupFilesAfterEnv: ['@testing-library/jest-native/extend-expect'],
setupFilesAfterEnv: ['@testing-library/react-native/extend-expect'],
transformIgnorePatterns: [
'node_modules/(?!(jest-)?react-native|@react-native|@react-native-community|@react-navigation|react-native-reanimated|@klarna|nanoid)',
],
Expand Down
1 change: 0 additions & 1 deletion template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
"@react-native/eslint-config": "^0.73.1",
"@react-native/metro-config": "^0.73.2",
"@react-native/typescript-config": "^0.73.1",
"@testing-library/jest-native": "^5.4.3",
"@testing-library/react-native": "^12.4.1",
"@tsconfig/react-native": "^3.0.2",
"@types/jest": "^29.5.5",
Expand Down

0 comments on commit ae3efaa

Please sign in to comment.