test: add jest
Showing
babel.config.js
0 → 100644
jest.config.js
0 → 100644
... | @@ -5,7 +5,7 @@ | ... | @@ -5,7 +5,7 @@ |
"license": "MIT", | "license": "MIT", | ||
"author": "LeoKu<czc12580520@gmail.com> (https://leoku.top)", | "author": "LeoKu<czc12580520@gmail.com> (https://leoku.top)", | ||
"scripts": { | "scripts": { | ||
"build": "vite build", | "build": "npm run test && vite build", | ||
"build:prerelease": "vite build --mode prerelease", | "build:prerelease": "vite build --mode prerelease", | ||
"deps": "yarn upgrade-interactive --latest", | "deps": "yarn upgrade-interactive --latest", | ||
"dev": "vite", | "dev": "vite", | ||
... | @@ -15,7 +15,8 @@ | ... | @@ -15,7 +15,8 @@ |
"lint:style": "stylelint \"src/**/*.{css,scss,vue}\"", | "lint:style": "stylelint \"src/**/*.{css,scss,vue}\"", | ||
"lint:ts": "tsc --noEmit --skipLibCheck", | "lint:ts": "tsc --noEmit --skipLibCheck", | ||
"prepare": "husky install", | "prepare": "husky install", | ||
"preview": "vite preview" | "preview": "vite preview", | ||
"test": "jest" | |||
}, | }, | ||
"dependencies": { | "dependencies": { | ||
"canvas-confetti": "^1.4.0", | "canvas-confetti": "^1.4.0", | ||
... | @@ -27,11 +28,16 @@ | ... | @@ -27,11 +28,16 @@ |
"vuex": "^4.0.2" | "vuex": "^4.0.2" | ||
}, | }, | ||
"devDependencies": { | "devDependencies": { | ||
"@babel/core": "^7.15.8", | |||
"@babel/preset-env": "^7.15.8", | |||
"@babel/preset-typescript": "^7.15.0", | |||
"@types/canvas-confetti": "^1.4.2", | "@types/canvas-confetti": "^1.4.2", | ||
"@types/jest": "^27.0.2", | |||
"@typescript-eslint/eslint-plugin": "^4.32.0", | "@typescript-eslint/eslint-plugin": "^4.32.0", | ||
"@typescript-eslint/parser": "^4.32.0", | "@typescript-eslint/parser": "^4.32.0", | ||
"@vitejs/plugin-vue": "^1.9.2", | "@vitejs/plugin-vue": "^1.9.2", | ||
"@vue/compiler-sfc": "^3.2.19", | "@vue/compiler-sfc": "^3.2.19", | ||
"babel-jest": "^27.2.5", | |||
"eslint": "^7.32.0", | "eslint": "^7.32.0", | ||
"eslint-config-prettier": "^8.3.0", | "eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-import": "^2.24.2", | "eslint-plugin-import": "^2.24.2", | ||
... | @@ -40,6 +46,7 @@ | ... | @@ -40,6 +46,7 @@ |
"eslint-plugin-tailwindcss": "^1.16.0", | "eslint-plugin-tailwindcss": "^1.16.0", | ||
"eslint-plugin-vue": "^7.18.0", | "eslint-plugin-vue": "^7.18.0", | ||
"husky": "^7.0.2", | "husky": "^7.0.2", | ||
"jest": "^27.2.5", | |||
"lint-staged": "^11.1.2", | "lint-staged": "^11.1.2", | ||
"prettier": "^2.4.1", | "prettier": "^2.4.1", | ||
"rollup-plugin-visualizer": "^5.5.2", | "rollup-plugin-visualizer": "^5.5.2", | ||
... | ... |
src/__tests__/utils.test.ts
0 → 100644
此差异已折叠。
想要评论请 注册 或 登录