mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
feat(tests): add jest-junit reporter for Azure DevOps integration
This commit is contained in:
@@ -4,6 +4,22 @@ module.exports = {
|
||||
...nxPreset,
|
||||
// Configure coverage reporters to include Cobertura XML reports
|
||||
coverageReporters: ['text', 'cobertura'],
|
||||
// Add Jest JUnit reporter for Azure DevOps integration
|
||||
reporters: [
|
||||
'default',
|
||||
[
|
||||
'jest-junit',
|
||||
{
|
||||
outputDirectory: 'testresults',
|
||||
outputName: 'TESTS',
|
||||
uniqueOutputName: 'true', // Needs to be a string for jest-junit
|
||||
classNameTemplate: '{classname}',
|
||||
titleTemplate: '{title}',
|
||||
ancestorSeparator: ' › ',
|
||||
usePathForSuiteName: true,
|
||||
},
|
||||
],
|
||||
],
|
||||
// Ensure coverage is collected from all relevant files
|
||||
collectCoverageFrom: [
|
||||
'**/*.{js,jsx,ts,tsx}',
|
||||
|
||||
1
package-lock.json
generated
1
package-lock.json
generated
@@ -90,6 +90,7 @@
|
||||
"jest": "^29.7.0",
|
||||
"jest-environment-jsdom": "^29.7.0",
|
||||
"jest-environment-node": "^29.7.0",
|
||||
"jest-junit": "^16.0.0",
|
||||
"jest-preset-angular": "~14.4.0",
|
||||
"ng-mocks": "^14.13.4",
|
||||
"ng-swagger-gen": "^2.3.1",
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"ng": "ng",
|
||||
"start": "nx serve isa-app --ssl",
|
||||
"test": "npx nx run-many -t test --exclude isa-app",
|
||||
"ci": "npx nx run-many -t test --exclude isa-app -c ci --coverage",
|
||||
"ci": "npx nx run-many -t test --exclude isa-app -c ci --coverage --reporters=jest-junit",
|
||||
"build": "nx build isa-app --configuration=development",
|
||||
"build-prod": "nx build isa-app --configuration=production",
|
||||
"lint": "nx lint",
|
||||
@@ -101,6 +101,7 @@
|
||||
"jest": "^29.7.0",
|
||||
"jest-environment-jsdom": "^29.7.0",
|
||||
"jest-environment-node": "^29.7.0",
|
||||
"jest-junit": "^16.0.0",
|
||||
"jest-preset-angular": "~14.4.0",
|
||||
"ng-mocks": "^14.13.4",
|
||||
"ng-swagger-gen": "^2.3.1",
|
||||
|
||||
Reference in New Issue
Block a user