test: fix unit tests, update snapshots

This commit is contained in:
woothu
2019-10-21 16:48:13 +02:00
parent d2e7838db6
commit 0ed0b7bbce
45 changed files with 1329 additions and 2052 deletions
+7 -10
View File
@@ -8,25 +8,22 @@ module.exports = {
transform: {
'^.+\\.vue$': 'vue-jest',
'.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
'^.+\\.jsx?$': '<rootDir>/node_modules/babel-jest'
'^.+\\.(js|jsx)?$': '<rootDir>/node_modules/babel-jest'
},
transformIgnorePatterns: ["/node_modules/(?!@coreui/icons)"],
transformIgnorePatterns: ['/node_modules/(?!@coreui/icons/vue|coreui)'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1'
},
snapshotSerializers: [
'jest-serializer-vue'
],
testMatch: [
'<rootDir>/(tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx))',
'<rootDir>/tests/unit/Dashboard.spec.js'
],
testMatch: ['<rootDir>/tests/unit/**/*.spec.js'],
verbose: true,
testURL: "http://localhost/",
testURL: 'http://localhost/',
collectCoverage: true,
collectCoverageFrom: [
"src/**/*.{js,vue}",
"!**/node_modules/**"
'src/**/*.{js,vue}',
'!**/node_modules/**'
],
coverageReporters: ["html", "text-summary"]
coverageReporters: ['html', 'text-summary']
}