Skip to content

Commit b69e967

Browse files
partial conversion from vitest to jest to deal with compatibility issues
1 parent 495a6ba commit b69e967

9 files changed

Lines changed: 3679 additions & 3249 deletions

File tree

jest.config.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
module.exports = {
2+
testEnvironment: "node",
3+
injectGlobals: true,
4+
globals: {
5+
__SDK_VERSION__: "test-version",
6+
},
7+
setupFiles: [
8+
"./test/mocks/react_native.ts",
9+
"./test/setup.ts",
10+
"./test/mocks/react_native_webview.ts",
11+
],
12+
setupFilesAfterEnv: [
13+
"./test/mocks/setup.ts",
14+
],
15+
collectCoverageFrom: ["src/**/*"],
16+
coverageReporters: ["text", "json", "html", "lcov"],
17+
testMatch: ["**/*_test.{ts,tsx}"],
18+
testPathIgnorePatterns: ["/node_modules/", "/dist/", "/build/", "/example/"],
19+
transform: {
20+
"^.+\\.(ts|tsx)$": [
21+
"ts-jest",
22+
{
23+
tsconfig: {
24+
jsx: "react",
25+
esModuleInterop: true,
26+
},
27+
},
28+
],
29+
"^.+\\.m?js$": [
30+
"ts-jest",
31+
{
32+
tsconfig: {
33+
allowJs: true,
34+
esModuleInterop: true,
35+
},
36+
},
37+
],
38+
},
39+
transformIgnorePatterns: [
40+
"node_modules/(?!(react-native|@react-native|react-native-webview|react-native-base64|msw|@mswjs|until-async|@mxenabled)/)",
41+
],
42+
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
43+
};

0 commit comments

Comments
 (0)