fix reports

This commit is contained in:
Николай Вигдоров
2025-03-09 12:49:46 +03:00
parent 9fe60df8d6
commit 3f8e4849f1
3 changed files with 15 additions and 1 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@
/coverage /coverage
**/junit.xml **/junit.xml
.dependencies-cache .dependencies-cache
/reports

View File

@ -3,4 +3,7 @@ module.exports = {
'^.+\\.(js|jsx)$': 'babel-jest', '^.+\\.(js|jsx)$': 'babel-jest',
}, },
reporters: ['default', 'jest-junit'], reporters: ['default', 'jest-junit'],
coverageReporters: ['cobertura', 'lcov', 'text'],
collectCoverageFrom: ['src/**/*.{js,jsx}', '!src/**/*.test.{js,jsx}', '!src/index.js', '!src/reportWebVitals.js'],
coverageDirectory: 'coverage',
}; };

View File

@ -8,7 +8,17 @@
"dev": "webpack serve --mode=development --open=false", "dev": "webpack serve --mode=development --open=false",
"build": "webpack --mode=production", "build": "webpack --mode=production",
"lint": "eslint -c .eslintrc.json src --fix", "lint": "eslint -c .eslintrc.json src --fix",
"test": "jest --coverage --verbose" "test": "jest --coverage --verbose",
"test:ci": "jest --coverage --verbose --ci --reporters=default --reporters=jest-junit"
},
"jest-junit": {
"outputDirectory": "reports",
"outputName": "junit.xml",
"ancestorSeparator": " ",
"uniqueOutputName": "false",
"suiteNameTemplate": "{filepath}",
"classNameTemplate": "{classname}",
"titleTemplate": "{title}"
}, },
"repository": { "repository": {
"type": "git", "type": "git",