Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FE] ci: Jest, RTL 테스트 환경 구축 #84

Merged
merged 10 commits into from
Jul 23, 2024
9 changes: 4 additions & 5 deletions frontend/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const path = require('path');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이전 브랜치에서 eslint 관련 버그 수정한 파일이 들어갔네요
다음에는 불필요한 파일이 들어가지 않았는지 확인해주세요!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

확인 고마워용~~~~!


module.exports = {
root: true,
env: { browser: true, es2020: true },
Expand Down Expand Up @@ -48,12 +50,9 @@ module.exports = {
},
settings: {
'import/resolver': {
node: {
alias: {
map: [['@', path.resolve(__dirname, 'src')]],
extensions: ['.js', '.jsx', '.ts', '.tsx'],
paths: ['src'],
alias: {
'@': path.resolve(__dirname, 'src/'),
},
},
},
},
Expand Down
14 changes: 13 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,20 @@
"dev": "webpack-dev-server --mode=development --open --hot --progress",
"start": "webpack serve --open --config webpack.config.js",
"build": "webpack --config webpack.config.js",
"lint:styles": "stylelint \"src/**/styles.ts\" --fix"
"lint:styles": "stylelint \"src/**/styles.ts\" --fix",
"test": "jest"
},
"jest": {
"testEnvironment": "jest-environment-jsdom"
},
"dependencies": {
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@tanstack/react-query": "^5.51.1",
"@tanstack/react-query-devtools": "^5.51.1",
"@testing-library/jest-dom": "^6.4.7",
"@testing-library/user-event": "^14.5.2",
"@types/jest": "^29.5.12",
"dotenv-webpack": "^8.1.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand All @@ -27,6 +34,8 @@
"@babel/preset-typescript": "^7.24.7",
"@emotion/babel-plugin": "^11.11.0",
"@stylelint/postcss-css-in-js": "^0.38.0",
"@testing-library/dom": "^10.4.0",
"@testing-library/react": "^16.0.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.16.0",
Expand All @@ -35,11 +44,14 @@
"clean-webpack-plugin": "^4.0.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-react": "^7.34.3",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.8",
"html-webpack-plugin": "^5.6.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"msw": "^2.3.1",
"postcss-syntax": "^0.36.2",
"prettier": "^3.3.2",
Expand Down
3 changes: 2 additions & 1 deletion frontend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"paths": {
"@/*": ["src/*"]
},
"jsxImportSource": "@emotion/react"
"jsxImportSource": "@emotion/react",
"types": ["jest", "@testing-library/jest-dom"]
},
"include": ["src", "**/*.tsx", "types.d.ts"],
"exclude": ["node_modules", "dist"]
Expand Down
Loading