Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into use-mutebable-source
Browse files Browse the repository at this point in the history
  • Loading branch information
wurstbonbon committed Aug 8, 2021
2 parents c7c2f0c + a1cad54 commit 2c97768
Show file tree
Hide file tree
Showing 12 changed files with 2,617 additions and 2,462 deletions.
14 changes: 5 additions & 9 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
const { defaults: tsjPreset } = require('ts-jest/presets')

const defaults = {
coverageDirectory: './coverage/',
collectCoverage: true,
testURL: 'http://localhost',
}
const testFolderPath = (folderName) => `<rootDir>/test/${folderName}/**/*.js`

const NORMAL_TEST_FOLDERS = ['components', 'hooks', 'integration', 'utils']

const standardConfig = {
...defaults,
displayName: 'ReactDOM',
testMatch: NORMAL_TEST_FOLDERS.map(testFolderPath),
}

const tsTestFolderPath = (folderName) =>
`<rootDir>/test/${folderName}/**/*.{ts,tsx}`

Expand All @@ -26,13 +21,14 @@ const tsStandardConfig = {
const rnConfig = {
...defaults,
displayName: 'React Native',
testMatch: [testFolderPath('react-native')],
testMatch: [tsTestFolderPath('react-native')],
preset: 'react-native',
transform: {
'^.+\\.js$': '<rootDir>/node_modules/react-native/jest/preprocessor.js',
...tsjPreset.transform,
},
}

module.exports = {
projects: [tsStandardConfig, standardConfig, rnConfig],
projects: [tsStandardConfig, rnConfig],
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,12 @@
"@testing-library/react": "^12.0.0",
"@testing-library/react-hooks": "^3.4.2",
"@testing-library/react-native": "^7.1.0",
"@types/create-react-class": "^15.6.3",
"@types/object-assign": "^4.0.30",
"@types/react": "^17.0.14",
"@types/react-dom": "^17.0.9",
"@types/react-is": "^17.0.1",
"@types/react-native": "^0.64.12",
"@types/react-redux": "^7.1.18",
"@typescript-eslint/eslint-plugin": "^4.28.0",
"@typescript-eslint/parser": "^4.28.0",
Expand Down
Loading

0 comments on commit 2c97768

Please sign in to comment.