Skip to content

Commit c2cd5b5

Browse files
committed
tests: jest config update
1 parent 8cb0aae commit c2cd5b5

File tree

4 files changed

+23
-9
lines changed

4 files changed

+23
-9
lines changed

jest/jest.config.vue2.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
module.exports = {
22
"rootDir": "../",
3-
"moduleFileExtensions": [
4-
"js",
5-
"json",
6-
"vue"
7-
],
3+
"moduleFileExtensions": ["js", "vue"],
84
"testTimeout": 1000,
95
"testEnvironment": "jsdom",
106
"transform": {

jest/jest.config.vue3.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
var base = require('./jest.config.vue2.js')
22

3-
module.exports = Object.assign({}, base, {
3+
module.exports = {
4+
"rootDir": "../",
5+
"moduleFileExtensions": ["js", "vue"],
6+
"testTimeout": 1000,
7+
"testEnvironment": "jsdom",
8+
9+
"transformIgnorePatterns": [
10+
"/node_modules/"
11+
],
12+
"collectCoverage": true,
13+
"collectCoverageFrom": [
14+
"**/src/**/*.{js,vue}",
15+
],
16+
"coverageReporters": [
17+
"html",
18+
"text-summary",
19+
"clover",
20+
"json"
21+
],
422
"transform": {
523
".*\\.(vue)$": "vue-next-jest",
624
"^.+\\.js$": "babel-jest",
@@ -11,4 +29,4 @@ module.exports = Object.assign({}, base, {
1129
'^vue-jest$': "<rootDir>/node_modules/vue-next-jest",
1230
'^unit-test-helpers$': "<rootDir>/tests/unit/helpers/vue3"
1331
},
14-
})
32+
}

tests/unit/helpers/vue2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { mount, createLocalVue } from '@vue/test-utils'
2-
import Multiselect from './../../../src/Multiselect'
2+
import Multiselect from './../../../src/Multiselect.vue'
33

44
export const createSelect = (props = {}, options = {}) => {
55
const localVue = createLocalVue()

tests/unit/helpers/vue3.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { mount } from '@vue/test-utils'
2-
import Multiselect from './../../../src/Multiselect'
2+
import Multiselect from './../../../src/Multiselect.vue'
33

44
export const createSelect = (props = {}, options = {}) => {
55
let config = {}

0 commit comments

Comments
 (0)