Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit db27c7d

Browse files
committed
chore(package*): add @swc/core @swc/jest @types/jest jest jest-environment-jsdom other configuration files.
1 parent 42db763 commit db27c7d

File tree

4 files changed

+2858
-113
lines changed

4 files changed

+2858
-113
lines changed

.swcrc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"jsc": {
3+
"target": "es2022",
4+
"parser": {
5+
"syntax": "typescript",
6+
"tsx": false
7+
},
8+
"transform": {
9+
"react": {
10+
"runtime": "automatic"
11+
}
12+
}
13+
}
14+
}

jest.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
transform: {
3+
'^.+\\.ts?$': '@swc/jest',
4+
},
5+
testEnvironment: 'jsdom',
6+
roots: ['<rootDir>/test'],
7+
reporters: [['github-actions', { silent: false }], 'summary'],
8+
};

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"typings": "dist/core/index.d.ts",
1111
"scripts": {
1212
"compiler": "tsc --noEmit ./compiler/src/index.ts && tsx ./compiler/src/index.ts",
13+
"test": "jest",
1314
"dev": "next dev",
1415
"dev:e2e": "cd e2e/site && npm run dev -- -p 4000",
1516
"test:e2e": "playwright test"
@@ -20,9 +21,14 @@
2021
},
2122
"devDependencies": {
2223
"@playwright/test": "^1.46.0",
24+
"@swc/core": "^1.7.10",
25+
"@swc/jest": "^0.2.36",
2326
"@types/css-modules": "^1.0.5",
27+
"@types/jest": "^29.5.12",
2428
"@types/node": "^20.12.13",
2529
"@types/react": "^18.3.3",
30+
"jest": "^29.7.0",
31+
"jest-environment-jsdom": "^29.7.0",
2632
"typescript": "^5.4.5"
2733
}
2834
}

0 commit comments

Comments
 (0)