mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
frontend: jest coverage
This commit is contained in:
parent
4cd8c58f53
commit
f57e11dd02
37
webapp/jest.config.js
Normal file
37
webapp/jest.config.js
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
module.exports = {
|
||||||
|
verbose: true,
|
||||||
|
collectCoverage: true,
|
||||||
|
collectCoverageFrom: [
|
||||||
|
'**/*.{js,vue}',
|
||||||
|
'!**/?(*.)+(spec|test|story).js?(x)',
|
||||||
|
'!**/node_modules/**',
|
||||||
|
'!**/.nuxt/**',
|
||||||
|
'!**/storybook/**',
|
||||||
|
'!**/coverage/**',
|
||||||
|
'!**/config/**',
|
||||||
|
'!**/maintenance/**',
|
||||||
|
'!**/plugins/**',
|
||||||
|
'!**/.eslintrc.js',
|
||||||
|
'!**/.prettierrc.js',
|
||||||
|
'!**/nuxt.config.js'
|
||||||
|
],
|
||||||
|
coverageReporters: ['lcov', 'text'],
|
||||||
|
setupFiles: ['<rootDir>/test/registerContext.js', '<rootDir>/test/testSetup.js'],
|
||||||
|
transform: {
|
||||||
|
'.*\\.(vue)$': 'vue-jest',
|
||||||
|
'^.+\\.js$': 'babel-jest'
|
||||||
|
},
|
||||||
|
testMatch: ['**/?(*.)+(spec|test).js?(x)'],
|
||||||
|
modulePathIgnorePatterns: ['<rootDir>/build/'],
|
||||||
|
moduleNameMapper: {
|
||||||
|
'\\.(svg)$': '<rootDir>/test/fileMock.js',
|
||||||
|
'\\.(css|less)$': 'identity-obj-proxy',
|
||||||
|
'^@/(.*)$': '<rootDir>/src/$1',
|
||||||
|
'^~/(.*)$': '<rootDir>/$1'
|
||||||
|
},
|
||||||
|
moduleFileExtensions: [
|
||||||
|
'js',
|
||||||
|
'json',
|
||||||
|
'vue'
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -17,51 +17,9 @@
|
|||||||
"lint": "eslint --ext .js,.vue .",
|
"lint": "eslint --ext .js,.vue .",
|
||||||
"locales": "../scripts/translations/missing-keys.sh && ../scripts/translations/sort.sh",
|
"locales": "../scripts/translations/missing-keys.sh && ../scripts/translations/sort.sh",
|
||||||
"precommit": "yarn lint",
|
"precommit": "yarn lint",
|
||||||
"test": "cross-env NODE_ENV=test jest --coverage",
|
"test": "cross-env NODE_ENV=test jest --runInBand --coverage --forceExit --detectOpenHandles",
|
||||||
"test:unit:debug": "node --inspect-brk ./node_modules/jest/bin/jest.js --no-cache --runInBand"
|
"test:unit:debug": "node --inspect-brk ./node_modules/jest/bin/jest.js --no-cache --runInBand"
|
||||||
},
|
},
|
||||||
"jest": {
|
|
||||||
"verbose": true,
|
|
||||||
"collectCoverageFrom": [
|
|
||||||
"**/*.{js,vue}",
|
|
||||||
"!**/?(*.)+(spec|test|story).js?(x)",
|
|
||||||
"!**/node_modules/**",
|
|
||||||
"!**/.nuxt/**",
|
|
||||||
"!**/storybook/**",
|
|
||||||
"!**/coverage/**",
|
|
||||||
"!**/config/**",
|
|
||||||
"!**/maintenance/**",
|
|
||||||
"!**/plugins/**",
|
|
||||||
"!**/.eslintrc.js",
|
|
||||||
"!**/.prettierrc.js",
|
|
||||||
"!**/nuxt.config.js"
|
|
||||||
],
|
|
||||||
"coverageReporters": [
|
|
||||||
"lcov"
|
|
||||||
],
|
|
||||||
"transform": {
|
|
||||||
".*\\.(vue)$": "vue-jest",
|
|
||||||
"^.+\\.js$": "babel-jest"
|
|
||||||
},
|
|
||||||
"moduleFileExtensions": [
|
|
||||||
"js",
|
|
||||||
"json",
|
|
||||||
"vue"
|
|
||||||
],
|
|
||||||
"moduleNameMapper": {
|
|
||||||
"\\.(svg)$": "<rootDir>/test/fileMock.js",
|
|
||||||
"\\.(css|less)$": "identity-obj-proxy",
|
|
||||||
"^@/(.*)$": "<rootDir>/src/$1",
|
|
||||||
"^~/(.*)$": "<rootDir>/$1"
|
|
||||||
},
|
|
||||||
"setupFiles": [
|
|
||||||
"<rootDir>/test/registerContext.js",
|
|
||||||
"<rootDir>/test/testSetup.js"
|
|
||||||
],
|
|
||||||
"testMatch": [
|
|
||||||
"**/?(*.)+(spec|test).js?(x)"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@human-connection/styleguide": "0.5.22",
|
"@human-connection/styleguide": "0.5.22",
|
||||||
"@nuxtjs/apollo": "^4.0.0-rc19",
|
"@nuxtjs/apollo": "^4.0.0-rc19",
|
||||||
@ -120,7 +78,7 @@
|
|||||||
"async-validator": "^3.2.4",
|
"async-validator": "^3.2.4",
|
||||||
"babel-core": "~7.0.0-bridge.0",
|
"babel-core": "~7.0.0-bridge.0",
|
||||||
"babel-eslint": "~10.1.0",
|
"babel-eslint": "~10.1.0",
|
||||||
"babel-jest": "~25.3.0",
|
"babel-jest": "~29.2.2",
|
||||||
"babel-loader": "~8.1.0",
|
"babel-loader": "~8.1.0",
|
||||||
"babel-plugin-require-context-hook": "^1.0.0",
|
"babel-plugin-require-context-hook": "^1.0.0",
|
||||||
"babel-preset-vue": "~2.0.2",
|
"babel-preset-vue": "~2.0.2",
|
||||||
@ -147,7 +105,7 @@
|
|||||||
"storybook-vue-router": "^1.0.7",
|
"storybook-vue-router": "^1.0.7",
|
||||||
"style-loader": "~0.23.1",
|
"style-loader": "~0.23.1",
|
||||||
"style-resources-loader": "~1.3.3",
|
"style-resources-loader": "~1.3.3",
|
||||||
"vue-jest": "~3.0.5",
|
"vue-jest": "~3.0.7",
|
||||||
"vue-svg-loader": "~0.16.0",
|
"vue-svg-loader": "~0.16.0",
|
||||||
"vue-template-compiler": "^2.6.11"
|
"vue-template-compiler": "^2.6.11"
|
||||||
}
|
}
|
||||||
|
|||||||
1145
webapp/yarn.lock
1145
webapp/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user