Skip to content

Commit fd16b4f

Browse files
committed
fix pipeline and tests
1 parent d0d2554 commit fd16b4f

File tree

3 files changed

+23
-16
lines changed

3 files changed

+23
-16
lines changed

babel.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// babel.config.js
2+
module.exports = {
3+
presets: ['module:metro-react-native-babel-preset'],
4+
};

jest.config.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// jest.config.js
2+
module.exports = {
3+
preset: 'react-native',
4+
transform: {
5+
'^.+\\.[tj]sx?$': 'babel-jest', // Transforms JavaScript, TypeScript, JSX, and TSX files using babel-jest
6+
},
7+
modulePathIgnorePatterns: [
8+
'<rootDir>/demos/',
9+
],
10+
testMatch: [
11+
'<rootDir>/__tests__/index.test.js?(x)',
12+
],
13+
setupFiles: [
14+
'<rootDir>/__tests__/setup.js',
15+
],
16+
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
17+
};

package.json

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"url": "https://github.com/AppsFlyerSDK/react-native-appsflyer/issues"
3131
},
3232
"devDependencies": {
33-
"@babel/preset-env": "^7.12.7",
33+
"@babel/preset-env": "^7.26.9",
34+
"@babel/preset-react": "^7.26.3",
3435
"babel-jest": "^26.6.3",
3536
"jest": "26.6.3",
3637
"react": "16.11.0",
@@ -40,20 +41,5 @@
4041
},
4142
"resolutions": {
4243
"react-native/@jest/create-cache-key-function": "^27.0.2"
43-
},
44-
"jest": {
45-
"modulePathIgnorePatterns": [
46-
"<rootDir>/demos/"
47-
],
48-
"testMatch": [
49-
"<rootDir>/__tests__/index.test.js?(x)"
50-
],
51-
"preset": "react-native",
52-
"transform": {
53-
"^.+\\.js$": "<rootDir>/node_modules/react-native/jest/preprocessor.js"
54-
},
55-
"setupFiles": [
56-
"<rootDir>/__tests__/setup.js"
57-
]
5844
}
5945
}

0 commit comments

Comments
 (0)