Skip to content

Commit 53d2248

Browse files
committed
fix: add test script and jest config to main branch
1 parent d1812c8 commit 53d2248

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

jest.config.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
export default {
2+
testEnvironment: 'jsdom',
3+
transform: {
4+
'^.+\\.(t|j)sx?$': 'ts-jest',
5+
},
6+
moduleNameMapper: {
7+
'\\.(css|less|scss|sass)$': 'identity-obj-proxy',
8+
'^@/(.*)$': '<rootDir>/$1',
9+
},
10+
setupFilesAfterEnv: ['<rootDir>/setupTests.ts'],
11+
testPathIgnorePatterns: ['/node_modules/', '/.next/'],
12+
preset: 'ts-jest',
13+
globals: {
14+
'ts-jest': {
15+
tsconfig: {
16+
jsx: 'react-jsx',
17+
},
18+
},
19+
},
20+
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"dev": "next dev",
77
"build": "next build",
88
"start": "next start",
9-
"lint": "next lint"
9+
"lint": "next lint",
10+
"test": "jest --coverage"
1011
},
1112
"engines": {
1213
"node": "22.x"

0 commit comments

Comments
 (0)