Skip to content

Commit 97b5ba3

Browse files
committed
Fix: fixed #1
vuejs/vue-jest#403 (comment) For Vue2: ``` npm install --save-dev @vue/cli-plugin-unit-jest@next @vue/vue2-jest jest ``` For Vue3: ``` npm install --save-dev @vue/cli-plugin-unit-jest@next @vue/vue3-jest jest ts-jest ```
1 parent 0caa975 commit 97b5ba3

File tree

3 files changed

+13963
-2
lines changed

3 files changed

+13963
-2
lines changed

Diff for: jest.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
22
moduleFileExtensions: ['js', 'jsx', 'json', 'vue'],
33
transform: {
4-
'^.+\\.vue$': 'vue-jest',
4+
'^.+\\.vue$': '@vue/vue2-jest',
55
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$':
66
'jest-transform-stub',
77
'^.+\\.jsx?$': 'babel-jest'

Diff for: package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@
4646
"devDependencies": {
4747
"@vue/cli-plugin-babel": "4.4.4",
4848
"@vue/cli-plugin-eslint": "4.4.4",
49-
"@vue/cli-plugin-unit-jest": "4.4.4",
49+
"@vue/cli-plugin-unit-jest": "5.0.6",
5050
"@vue/cli-service": "4.4.4",
5151
"@vue/test-utils": "1.0.0-beta.29",
52+
"@vue/vue2-jest": "^29.2.5",
5253
"autoprefixer": "9.5.1",
5354
"babel-eslint": "10.1.0",
5455
"babel-jest": "23.6.0",
@@ -60,6 +61,7 @@
6061
"eslint-plugin-vue": "6.2.2",
6162
"html-webpack-plugin": "3.2.0",
6263
"husky": "1.3.1",
64+
"jest": "^29.6.2",
6365
"lint-staged": "8.1.5",
6466
"mockjs": "1.0.1-beta3",
6567
"plop": "2.3.0",

0 commit comments

Comments
 (0)