maintenance: add jest as unit test

This commit is contained in:
MengYX
2021-12-14 15:39:52 +08:00
parent 8facd65834
commit ada078df19
6 changed files with 113 additions and 130 deletions
+1
View File
@@ -1,6 +1,7 @@
.DS_Store
node_modules
/dist
/coverage
# local env files
.env.local
+2 -1
View File
@@ -1,6 +1,7 @@
module.exports = {
presets: [
'@vue/app'
'@vue/app',
'@babel/preset-typescript'
],
plugins: [
["component", {
+5
View File
@@ -0,0 +1,5 @@
module.exports = {
moduleNameMapper: {
'@/(.*)': '<rootDir>/src/$1'
}
};
+100 -128
View File
File diff suppressed because it is too large Load Diff
+3
View File
@@ -12,10 +12,12 @@
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"test": "jest",
"fix-compatibility": "node ./src/fix-compatibility.js",
"make-extension": "node ./make-extension.js"
},
"dependencies": {
"@babel/preset-typescript": "^7.16.5",
"base64-js": "^1.5.1",
"browser-id3-writer": "^4.4.0",
"core-js": "^3.16.0",
@@ -32,6 +34,7 @@
},
"devDependencies": {
"@types/crypto-js": "^4.0.2",
"@types/jest": "^27.0.3",
"@vue/cli-plugin-babel": "^4.5.13",
"@vue/cli-plugin-pwa": "^4.5.13",
"@vue/cli-plugin-typescript": "^4.5.13",
+2 -1
View File
@@ -14,7 +14,8 @@
"sourceMap": true,
"baseUrl": ".",
"types": [
"webpack-env"
"webpack-env",
"jest"
],
"paths": {
"@/*": [