Skip to content

Commit

Permalink
adds fixed test coverage for App.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
jomurgel committed Sep 6, 2024
1 parent a6e18d7 commit 24ee994
Show file tree
Hide file tree
Showing 10 changed files with 2,697 additions and 1,554 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
},
"plugins": [
"react",
"testing-library",
"react-native",
"@typescript-eslint",
"import",
Expand Down
2 changes: 1 addition & 1 deletion App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { ReactElement } from 'react'
import { NavigationContainer } from '@react-navigation/native'
import { Provider } from 'react-redux'
import { ReactElement } from 'react'
import { SafeAreaProvider } from 'react-native-safe-area-context'
import AppStack from './src/components/AppStack'
import AuthProvider from './src/providers/AuthProvider'
Expand Down
16 changes: 15 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,21 @@ module.exports = ( api ) => {
'@babel/preset-react',
],
plugins: [
'@babel/plugin-transform-runtime',
[ 'module-resolver', {
extensions: [
'.js',
'.jsx',
'.ts',
'.tsx',
'.android.js',
'.android.tsx',
'.ios.js',
'.ios.tsx',
],
root: [
'./src',
],
} ],
],
}
}
9 changes: 6 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
module.exports = {
preset: 'jest-expo',
moduleFileExtensions: [ 'js', 'jsx', 'json', 'ts', 'tsx' ],
transform: {
'^.+\\.tsx?$': ['babel-jest'],
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
},
testPathIgnorePatterns: [ '/node_modules/', '/android/', '/ios/' ],
testEnvironment: 'jsdom',
moduleFileExtensions: [ 'js', 'jsx', 'ts', 'tsx' ],
testMatch: [
'**/*.test.ts?(x)',
],
testEnvironment: 'node',
}
Loading

0 comments on commit 24ee994

Please sign in to comment.