Skip to content

Commit

Permalink
tests: jest config update
Browse files Browse the repository at this point in the history
  • Loading branch information
adamberecz committed Jul 22, 2022
1 parent 8cb0aae commit c2cd5b5
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 9 deletions.
6 changes: 1 addition & 5 deletions jest/jest.config.vue2.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
module.exports = {
"rootDir": "../",
"moduleFileExtensions": [
"js",
"json",
"vue"
],
"moduleFileExtensions": ["js", "vue"],
"testTimeout": 1000,
"testEnvironment": "jsdom",
"transform": {
Expand Down
22 changes: 20 additions & 2 deletions jest/jest.config.vue3.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
var base = require('./jest.config.vue2.js')

module.exports = Object.assign({}, base, {
module.exports = {
"rootDir": "../",
"moduleFileExtensions": ["js", "vue"],
"testTimeout": 1000,
"testEnvironment": "jsdom",

"transformIgnorePatterns": [
"/node_modules/"
],
"collectCoverage": true,
"collectCoverageFrom": [
"**/src/**/*.{js,vue}",
],
"coverageReporters": [
"html",
"text-summary",
"clover",
"json"
],
"transform": {
".*\\.(vue)$": "vue-next-jest",
"^.+\\.js$": "babel-jest",
Expand All @@ -11,4 +29,4 @@ module.exports = Object.assign({}, base, {
'^vue-jest$': "<rootDir>/node_modules/vue-next-jest",
'^unit-test-helpers$': "<rootDir>/tests/unit/helpers/vue3"
},
})
}
2 changes: 1 addition & 1 deletion tests/unit/helpers/vue2.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { mount, createLocalVue } from '@vue/test-utils'
import Multiselect from './../../../src/Multiselect'
import Multiselect from './../../../src/Multiselect.vue'

export const createSelect = (props = {}, options = {}) => {
const localVue = createLocalVue()
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/helpers/vue3.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { mount } from '@vue/test-utils'
import Multiselect from './../../../src/Multiselect'
import Multiselect from './../../../src/Multiselect.vue'

export const createSelect = (props = {}, options = {}) => {
let config = {}
Expand Down

0 comments on commit c2cd5b5

Please sign in to comment.