-
-
Notifications
You must be signed in to change notification settings - Fork 871
Expand file tree
/
Copy pathjest.config.js
More file actions
31 lines (29 loc) · 694 Bytes
/
Copy pathjest.config.js
File metadata and controls
31 lines (29 loc) · 694 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
const nativeTransform = {
'\\.[jt]sx?$': [
'babel-jest',
{ configFile: require.resolve('./babel.config.js') },
],
};
const base = {
preset: 'react-native',
setupFilesAfterEnv: ['<rootDir>/jest/setup.js'],
testPathIgnorePatterns: ['/node_modules/', '/example/'],
};
module.exports = {
projects: [
{
...base,
displayName: 'native',
transform: nativeTransform,
},
{
// Same suite, but the library source keeps its `const`/`let` bindings.
...base,
displayName: 'web-semantics',
transform: {
'GooglePlacesAutocomplete\\.js$': '<rootDir>/jest/web-transformer.js',
...nativeTransform,
},
},
],
};