chore: run linter to fix code style issues

This commit is contained in:
Jozef Izso 2025-11-12 13:41:29 +01:00
parent 7148297f02
commit 5fb0582760
Failed to extract signature
2 changed files with 4 additions and 5 deletions

View file

@ -263,15 +263,15 @@ describe('jest-junit tests', () => {
const parser = new JestJunitParser(opts) const parser = new JestJunitParser(opts)
const result = await parser.parse(filePath, fileContent) const result = await parser.parse(filePath, fileContent)
// Check if this fixture has failures to determine expected behavior // Check if this fixture has failures to determine expected behavior
const hasFailed = result.failed > 0 const hasFailed = result.failed > 0
const report = getReport([result], { const report = getReport([result], {
...DEFAULT_OPTIONS, ...DEFAULT_OPTIONS,
collapsed: 'auto' collapsed: 'auto'
}) })
if (hasFailed) { if (hasFailed) {
// Should not collapse when there are failures // Should not collapse when there are failures
expect(report).not.toContain('<details><summary>Expand for details</summary>') expect(report).not.toContain('<details><summary>Expand for details</summary>')

3
dist/index.js generated vendored
View file

@ -2036,8 +2036,7 @@ function getTestRunsReport(testRuns, options) {
const sections = []; const sections = [];
const totalFailed = testRuns.reduce((sum, tr) => sum + tr.failed, 0); const totalFailed = testRuns.reduce((sum, tr) => sum + tr.failed, 0);
// Determine if report should be collapsed based on collapsed option // Determine if report should be collapsed based on collapsed option
const shouldCollapse = options.collapsed === 'always' || const shouldCollapse = options.collapsed === 'always' || (options.collapsed === 'auto' && totalFailed === 0);
(options.collapsed === 'auto' && totalFailed === 0);
if (shouldCollapse) { if (shouldCollapse) {
sections.push(`<details><summary>Expand for details</summary>`); sections.push(`<details><summary>Expand for details</summary>`);
sections.push(` `); sections.push(` `);