feat(tests): add jest-junit reporter for Azure DevOps integration

This commit is contained in:
Lorenz Hilpert
2025-04-25 19:15:29 +02:00
parent a48ff29051
commit 5db3521a0e
3 changed files with 19 additions and 1 deletions

View File

@@ -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}',