Skip to content

Commit

Permalink
Add support for unit testing with jest
Browse files Browse the repository at this point in the history
Using `vue add unit-jest`
  • Loading branch information
Pezmc committed Oct 24, 2022
1 parent 7345202 commit 8fba881
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}
3 changes: 3 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
preset: '@vue/cli-plugin-unit-jest'
}
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,17 @@
"@babel/eslint-parser": "^7.12.16",
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-plugin-unit-jest": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"@vue/test-utils": "^2.0.0-0",
"@vue/vue3-jest": "^27.0.0-alpha.1",
"autoprefixer": "^10.4.2",
"babel-jest": "^27.0.6",
"dotenv-webpack": "^7.1.0",
"eslint": "^8.25.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-vue": "^8.0.3",
"jest": "^27.0.5",
"marked": "^4.0.12",
"node-sass": "^7.0.1",
"postcss": "^8.4.7",
Expand All @@ -54,7 +59,8 @@
"serve": "vue-cli-service serve",
"build": "rollup -c",
"build-docs": "vue-cli-service build",
"lint": "eslint --ext .js,.vue src/"
"lint": "eslint --ext .js,.vue src/",
"test:unit": "vue-cli-service test:unit"
},
"dependencies": {
"underscore": "^1.13.2"
Expand Down

0 comments on commit 8fba881

Please sign in to comment.