Skip to content

Commit 1eda12a

Browse files
committed
tests(styled-components-native): fix settings
1 parent febf07c commit 1eda12a

File tree

2 files changed

+34
-20
lines changed

2 files changed

+34
-20
lines changed

jest.config.js

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,36 @@
11
module.exports = {
2-
testEnvironment: 'jsdom',
3-
transformIgnorePatterns: ['<rootDir>.*(node_modules)(?!.*@xstyled.*).*$'],
4-
transform: {
5-
'^.+\\.(j|t)sx?$': 'babel-jest',
6-
},
7-
testPathIgnorePatterns: ['/node_modules/', '/website/'],
8-
coveragePathIgnorePatterns: ['/node_modules/', '/dist/'],
9-
moduleNameMapper: {
10-
'styled-components':
11-
'<rootDir>/node_modules/styled-components/dist/styled-components.browser.cjs.js',
12-
},
2+
projects: [
3+
{
4+
displayName: 'web',
5+
testEnvironment: 'jsdom',
6+
transformIgnorePatterns: ['<rootDir>.*(node_modules)(?!.*@xstyled.*).*$'],
7+
transform: {
8+
'^.+\\.(j|t)sx?$': 'babel-jest',
9+
},
10+
testPathIgnorePatterns: [
11+
'/node_modules/',
12+
'/website/',
13+
'/packages/styled-components-native/',
14+
],
15+
coveragePathIgnorePatterns: ['/node_modules/', '/dist/'],
16+
moduleNameMapper: {
17+
'styled-components':
18+
'<rootDir>/node_modules/styled-components/dist/styled-components.browser.cjs.js',
19+
},
20+
},
21+
{
22+
displayName: 'native',
23+
preset: 'react-native',
24+
transformIgnorePatterns: ['node_modules/(?!@react-native|react-native)'],
25+
transform: {
26+
'^.+\\.(j|t)sx?$': 'babel-jest',
27+
},
28+
testPathIgnorePatterns: [
29+
'/node_modules/',
30+
'/website/',
31+
'/packages/(?!styled-components-native)',
32+
],
33+
coveragePathIgnorePatterns: ['/node_modules/', '/dist/'],
34+
},
35+
],
1336
}

packages/styled-components-native/jest.config.cjs

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)