mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
feat(tests): add jest-junit reporter for Azure DevOps integration
This commit is contained in:
@@ -4,6 +4,22 @@ module.exports = {
|
|||||||
...nxPreset,
|
...nxPreset,
|
||||||
// Configure coverage reporters to include Cobertura XML reports
|
// Configure coverage reporters to include Cobertura XML reports
|
||||||
coverageReporters: ['text', 'cobertura'],
|
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
|
// Ensure coverage is collected from all relevant files
|
||||||
collectCoverageFrom: [
|
collectCoverageFrom: [
|
||||||
'**/*.{js,jsx,ts,tsx}',
|
'**/*.{js,jsx,ts,tsx}',
|
||||||
|
|||||||
1
package-lock.json
generated
1
package-lock.json
generated
@@ -90,6 +90,7 @@
|
|||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"jest-environment-jsdom": "^29.7.0",
|
"jest-environment-jsdom": "^29.7.0",
|
||||||
"jest-environment-node": "^29.7.0",
|
"jest-environment-node": "^29.7.0",
|
||||||
|
"jest-junit": "^16.0.0",
|
||||||
"jest-preset-angular": "~14.4.0",
|
"jest-preset-angular": "~14.4.0",
|
||||||
"ng-mocks": "^14.13.4",
|
"ng-mocks": "^14.13.4",
|
||||||
"ng-swagger-gen": "^2.3.1",
|
"ng-swagger-gen": "^2.3.1",
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "nx serve isa-app --ssl",
|
"start": "nx serve isa-app --ssl",
|
||||||
"test": "npx nx run-many -t test --exclude isa-app",
|
"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": "nx build isa-app --configuration=development",
|
||||||
"build-prod": "nx build isa-app --configuration=production",
|
"build-prod": "nx build isa-app --configuration=production",
|
||||||
"lint": "nx lint",
|
"lint": "nx lint",
|
||||||
@@ -101,6 +101,7 @@
|
|||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"jest-environment-jsdom": "^29.7.0",
|
"jest-environment-jsdom": "^29.7.0",
|
||||||
"jest-environment-node": "^29.7.0",
|
"jest-environment-node": "^29.7.0",
|
||||||
|
"jest-junit": "^16.0.0",
|
||||||
"jest-preset-angular": "~14.4.0",
|
"jest-preset-angular": "~14.4.0",
|
||||||
"ng-mocks": "^14.13.4",
|
"ng-mocks": "^14.13.4",
|
||||||
"ng-swagger-gen": "^2.3.1",
|
"ng-swagger-gen": "^2.3.1",
|
||||||
|
|||||||
Reference in New Issue
Block a user