Skip to content

Commit

Permalink
tests(styled-components-native): fix settings
Browse files Browse the repository at this point in the history
  • Loading branch information
igorwessel committed Aug 21, 2022
1 parent febf07c commit 1eda12a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 20 deletions.
45 changes: 34 additions & 11 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,36 @@
module.exports = {
testEnvironment: 'jsdom',
transformIgnorePatterns: ['<rootDir>.*(node_modules)(?!.*@xstyled.*).*$'],
transform: {
'^.+\\.(j|t)sx?$': 'babel-jest',
},
testPathIgnorePatterns: ['/node_modules/', '/website/'],
coveragePathIgnorePatterns: ['/node_modules/', '/dist/'],
moduleNameMapper: {
'styled-components':
'<rootDir>/node_modules/styled-components/dist/styled-components.browser.cjs.js',
},
projects: [
{
displayName: 'web',
testEnvironment: 'jsdom',
transformIgnorePatterns: ['<rootDir>.*(node_modules)(?!.*@xstyled.*).*$'],
transform: {
'^.+\\.(j|t)sx?$': 'babel-jest',
},
testPathIgnorePatterns: [
'/node_modules/',
'/website/',
'/packages/styled-components-native/',
],
coveragePathIgnorePatterns: ['/node_modules/', '/dist/'],
moduleNameMapper: {
'styled-components':
'<rootDir>/node_modules/styled-components/dist/styled-components.browser.cjs.js',
},
},
{
displayName: 'native',
preset: 'react-native',
transformIgnorePatterns: ['node_modules/(?!@react-native|react-native)'],
transform: {
'^.+\\.(j|t)sx?$': 'babel-jest',
},
testPathIgnorePatterns: [
'/node_modules/',
'/website/',
'/packages/(?!styled-components-native)',
],
coveragePathIgnorePatterns: ['/node_modules/', '/dist/'],
},
],
}
9 changes: 0 additions & 9 deletions packages/styled-components-native/jest.config.cjs

This file was deleted.

0 comments on commit 1eda12a

Please sign in to comment.