Skip to content

Commit 1c9920a

Browse files
committed
Improve coverage
1 parent e43bbc6 commit 1c9920a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

node-src/tasks/report.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,16 @@ describe('generateRport', () => {
100100
path.join(__dirname, '../../chromatic-build-1.xml')
101101
);
102102
});
103+
104+
it('skips report generation when junitReport is false', async () => {
105+
const ctx = {
106+
client,
107+
log: { ...log, debug: vi.fn() },
108+
options: { junitReport: false },
109+
build,
110+
} as any;
111+
await generateReport(ctx);
112+
expect(ctx.log.debug).toHaveBeenCalledWith('junit report not configured, skipping');
113+
expect(reportBuilder.writeTo).not.toHaveBeenCalled();
114+
});
103115
});

0 commit comments

Comments
 (0)