Skip to content

Commit c7a4459

Browse files
committed
Handle svg icon suffix and add fixture smoke test
1 parent ed667c8 commit c7a4459

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

src/tests/integration/fixture.test.ts

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,15 @@ describe('Fixture Smoke Test', () => {
1515
// Validate the generated file using comapeocat Reader
1616
const reader = new Reader(result.outputPath);
1717
const validationResult = await reader.validate();
18-
19-
// If there are validation errors, log them for debugging
20-
if (Array.isArray(validationResult) && validationResult.length > 0) {
21-
const errors = validationResult.map(e => `${e.message} at ${e.filePath || 'unknown'}`).join('\n');
22-
console.error('Validation Errors:\n', errors);
23-
}
24-
25-
// Expect no validation errors (returns undefined or empty array on success)
26-
if (validationResult) {
27-
expect(validationResult).toEqual([]);
28-
} else {
29-
expect(validationResult).toBeUndefined();
18+
19+
const errors = Array.isArray(validationResult) ? validationResult : [];
20+
21+
if (errors.length > 0) {
22+
const message = errors.map(e => `${e.message} at ${e.filePath || 'unknown'}`).join('\n');
23+
console.error('Validation Errors:\n', message);
3024
}
25+
26+
expect(errors).toHaveLength(0);
3127

3228
// Cleanup
3329
await fs.rm(result.outputPath).catch(() => {});

0 commit comments

Comments
 (0)