Skip to content

Commit

Permalink
[wenjie] #N/A feat: add vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwenjie committed Feb 13, 2022
1 parent 4784bc2 commit c9eaf1e
Show file tree
Hide file tree
Showing 21 changed files with 196 additions and 1,946 deletions.
1 change: 0 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"env": {
"jest": true,
"browser": true,
"es2021": true
},
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Personal Opinionated React Starter Template

- [Vite](https://vitejs.dev/)

- [Vitest](https://vitest.dev/)

- [SWR](https://swr.vercel.app/)

- [Tailwind](https://tailwindcss.com/)
Expand All @@ -18,8 +20,6 @@ Personal Opinionated React Starter Template

- ESLint, Prettier and stylelint. Pre-check with Husky and lint-staged.

- Unit testing with Jest

- CI/CD via GitHub Actions

## Running the project
Expand Down
1 change: 0 additions & 1 deletion jest-setup.ts

This file was deleted.

26 changes: 0 additions & 26 deletions jest.config.js

This file was deleted.

15 changes: 6 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"test:prettier": "prettier \"**/*.{ts,tsx,md,css,html,json}\" --list-different",
"test:css": "stylelint \"**/*.css\"",
"test:build": "run-p build",
"test:unit": "jest --collectCoverage",
"test:unit": "vitest run",
"watch": "run-p watch:*",
"watch:test": "jest --watch",
"cov": "run-s test:unit && open-cli coverage/lcov-report/index.html",
"watch:test": "vitest watch",
"cov": "vitest run --coverage",
"fix": "run-s fix:*",
"fix:prettier": "prettier \"**/*.{ts,tsx,md,css,html,json}\" --write",
"fix:lint": "eslint src --ext .ts,.tsx --fix",
Expand All @@ -38,9 +38,7 @@
"swr": "^1.2.1"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/react": "^12.1.2",
"@types/jest": "^27.4.0",
"@types/lodash": "^4.14.178",
"@types/node": "^17.0.17",
"@types/react": "^17.0.39",
Expand All @@ -50,6 +48,7 @@
"@typescript-eslint/parser": "^5.11.0",
"@vitejs/plugin-react": "^1.2.0",
"autoprefixer": "^10.4.2",
"c8": "^7.11.0",
"eslint": "^8.9.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.3.0",
Expand All @@ -60,21 +59,19 @@
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"husky": "^7.0.4",
"identity-obj-proxy": "^3.0.0",
"jest": "^27.5.1",
"jsdom": "^19.0.0",
"lint-staged": "^12.3.3",
"npm-run-all": "^4.1.5",
"open-cli": "^7.0.1",
"postcss": "^8.4.6",
"prettier": "^2.5.1",
"rollup": "^2.0.0",
"rollup-plugin-visualizer": "^5.5.4",
"standard-version": "^9.3.2",
"stylelint": "^14.5.0",
"stylelint-config-prettier": "^9.0.3",
"stylelint-config-standard": "^25.0.0",
"stylelint-prettier": "^2.0.0",
"tailwindcss": "^3.0.22",
"ts-jest": "^27.1.3",
"typescript": "^4.5.5",
"vite": "^2.8.1",
"vite-plugin-svgr": "^1.0.1",
Expand Down

1 comment on commit c9eaf1e

@vercel
Copy link

@vercel vercel bot commented on c9eaf1e Feb 13, 2022

Choose a reason for hiding this comment

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

Please sign in to comment.