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