Add Vitest coverage reporting to Woodpecker CI
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful

This commit is contained in:
2026-04-10 15:00:13 +02:00
parent 74b54730cc
commit 6f617fe449
9 changed files with 1076 additions and 3 deletions
+18
View File
@@ -0,0 +1,18 @@
import { describe, expect, it } from 'vitest';
import { formatDate } from '../../../src/features/shared/date-utils.js';
describe('formatDate', () => {
it('returns fallback when date value is missing', () => {
expect(formatDate('')).toBe('Not set');
expect(formatDate(null)).toBe('Not set');
});
it('returns the raw input for invalid date values', () => {
expect(formatDate('not-a-date')).toBe('not-a-date');
});
it('formats valid date values', () => {
expect(formatDate('2026-01-15')).toContain('2026');
});
});