test(06-02): add failing tests for RRULE UNTIL/COUNT + FREQ persistence
- vevent.test.ts: add COUNT, UNTIL-DATE, UNTIL-DATETIME serialization assertions - outboxWorker.test.ts: add assembleRruleString (D-06) describe block (not yet exported) - outboxWorker.test.ts: add FREQ persistence (D-07 regression) describe block - RED: assembleRruleString not yet exported; FREQ-persistence cases fail on missing helper
This commit is contained in:
@@ -90,6 +90,43 @@ describe('buildVeventString', () => {
|
||||
expect(result.icsString).not.toContain('RRULE:')
|
||||
})
|
||||
|
||||
// D-06: RRULE COUNT — verified ical.js 2.2.1 output
|
||||
it('serializes COUNT in RRULE for a timed event (D-06)', () => {
|
||||
const result = buildVeventString({
|
||||
summary: 'Weekly',
|
||||
allDay: false,
|
||||
dtstart: new Date('2026-06-10T09:00:00Z'),
|
||||
dtend: new Date('2026-06-10T10:00:00Z'),
|
||||
rruleString: 'FREQ=WEEKLY;COUNT=5',
|
||||
})
|
||||
expect(result.icsString).toContain('RRULE:FREQ=WEEKLY;COUNT=5')
|
||||
})
|
||||
|
||||
// D-06: RRULE UNTIL DATE form — all-day event must NOT contain T235959Z
|
||||
it('serializes UNTIL as DATE form for all-day events (D-06)', () => {
|
||||
const result = buildVeventString({
|
||||
summary: 'Daily standup',
|
||||
allDay: true,
|
||||
dtstart: '2026-06-10',
|
||||
dtend: '2026-06-11',
|
||||
rruleString: 'FREQ=DAILY;UNTIL=20260630',
|
||||
})
|
||||
expect(result.icsString).toContain('RRULE:FREQ=DAILY;UNTIL=20260630')
|
||||
expect(result.icsString).not.toContain('T235959Z')
|
||||
})
|
||||
|
||||
// D-06: RRULE UNTIL DATETIME UTC form — timed event
|
||||
it('serializes UNTIL as DATETIME UTC form for timed events (D-06)', () => {
|
||||
const result = buildVeventString({
|
||||
summary: 'Weekly',
|
||||
allDay: false,
|
||||
dtstart: new Date('2026-06-10T09:00:00Z'),
|
||||
dtend: new Date('2026-06-10T10:00:00Z'),
|
||||
rruleString: 'FREQ=WEEKLY;UNTIL=20260630T235959Z',
|
||||
})
|
||||
expect(result.icsString).toContain('RRULE:FREQ=WEEKLY;UNTIL=20260630T235959Z')
|
||||
})
|
||||
|
||||
it('uses the provided uid when given', () => {
|
||||
const uid = 'custom-uid-001@familysync'
|
||||
const result = buildVeventString({
|
||||
|
||||
Reference in New Issue
Block a user