Skip to content

Commit 6c0ad5d

Browse files
committedSep 20, 2022
feat: jest 설치 및 설정
1 parent 34270a1 commit 6c0ad5d

File tree

4 files changed

+2695
-86
lines changed

4 files changed

+2695
-86
lines changed
 

‎jest.config.ts

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export default {
2+
preset: 'ts-jest',
3+
testEnvironment: 'jsdom',
4+
testMatch: ['**/__tests__/**/*.ts?(x)', '**/?(*.)+(test).ts?(x)'],
5+
transform: {
6+
'^.+\\.(js|ts)$': 'ts-jest',
7+
},
8+
};

‎package.json

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
{
2+
"type": "module",
3+
"scripts": {
4+
"test": "jest"
5+
},
26
"dependencies": {
3-
"ts-node": "^10.4.0"
7+
"ts-node": "^10.4.0",
8+
"typescript": "^4.8.3"
49
},
510
"devDependencies": {
6-
"@types/node": "^18.7.18"
11+
"@types/jest": "^29.0.3",
12+
"@types/node": "^18.7.18",
13+
"jest": "^29.0.3",
14+
"jest-environment-jsdom": "^29.0.3",
15+
"ts-jest": "^29.0.1"
716
}
817
}

‎tsconfig.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"compilerOptions": {
3+
"types": ["jest", "node"]
4+
}
5+
}

‎yarn.lock

+2,671-84
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.