feat: Setup Unit Test Environment and Refactor Typescript Config (#365)

* modify tsconfig and set up unit tests

* generate .d.ts files

* setup project dependencies and configuration for unit tests

* Add test setup and layout-test-utils along with first spec

* Add paths back to tsconfig

* remove type=module from package.json

* Add typescript definition for .env

* update package-lock
This commit is contained in:
Dan Orlando 2023-05-22 17:49:48 -07:00 committed by GitHub
parent dbfef342e2
commit 4eda4542b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 8805 additions and 14010 deletions

View file

@ -2,11 +2,12 @@
"name": "chat-frontend",
"version": "0.4.6",
"description": "",
"type": "module",
"scripts": {
"build": "vite build",
"dev": "vite",
"preview-prod": "vite preview"
"preview-prod": "vite preview",
"test": "jest --watch",
"test:ci": "jest --ci"
},
"repository": {
"type": "git",
@ -80,24 +81,38 @@
},
"devDependencies": {
"@babel/cli": "^7.20.7",
"@babel/core": "^7.20.12",
"@babel/core": "^7.21.8",
"@babel/eslint-parser": "^7.19.1",
"@babel/plugin-transform-runtime": "^7.19.6",
"@babel/preset-env": "^7.20.2",
"@babel/plugin-transform-runtime": "^7.21.4",
"@babel/preset-env": "^7.21.5",
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.21.0",
"@babel/runtime": "^7.20.13",
"@tanstack/react-query-devtools": "^4.29.0",
"@types/jest": "^29.5.0",
"@types/node": "^20.2.3",
"@types/react": "^18.0.30",
"@testing-library/dom": "^9.3.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"@types/jest": "^29.5.1",
"@types/node": "^18.16.13",
"@types/react": "^18.2.6",
"@types/react-dom": "^18.0.11",
"@vitejs/plugin-react": "^4.0.0",
"autoprefixer": "^10.4.13",
"babel-jest": "^29.5.0",
"babel-loader": "^9.1.2",
"babel-plugin-replace-ts-export-assignment": "^0.0.2",
"babel-plugin-root-import": "^6.6.0",
"babel-plugin-transform-import-meta": "^2.2.0",
"babel-plugin-transform-vite-meta-env": "^1.0.3",
"babel-preset-react": "^6.24.1",
"css-loader": "^6.7.3",
"eslint-plugin-jest": "^27.2.1",
"jest": "^29.5.0",
"jest-canvas-mock": "^2.5.1",
"jest-environment-jsdom": "^29.5.0",
"jest-file-loader": "^1.0.3",
"jest-junit": "^16.0.0",
"path": "^0.12.7",
"postcss": "^8.4.21",
"postcss-loader": "^7.1.0",
@ -105,6 +120,7 @@
"source-map-loader": "^4.0.1",
"style-loader": "^3.3.1",
"tailwindcss": "^3.2.6",
"ts-jest": "^29.1.0",
"ts-loader": "^9.4.2",
"typescript": "^5.0.4",
"vite": "^4.2.1",