Skip to content

Web UI: write vCard 3.0 and add vitest for the vCard/ICS helpers - #30

Merged
gnacho merged 1 commit into
mainfrom
chore/ui-tests-vcard3
Oct 17, 2026
Merged

gnacho merged 1 commit into
mainfrom
chore/ui-tests-vcard3

Conversation

@gnacho

@gnacho gnacho commented Oct 17, 2026

Copy link
Copy Markdown
Owner

Closes #23. Closes #24.

  • buildVCard wrote VERSION:4.0 (plus KIND, a 4.0 property) while the stored cards in the wild are 3.0; it now writes 3.0 without KIND.
  • vitest (10 tests) over vcard.ts and ics.ts: escape/unescape round trip, UID generation, the 3.0 shape, recurrence expansion and filtering, empty result on unparseable input.
  • Writing the tests caught a real UI bug: parseVCard lost newlines when unescaping (\\n became a bare n); it now unescapes per RFC 6350.
  • The CI web job runs npm test before the build.

- buildVCard wrote VERSION:4.0 (plus KIND, a 4.0 property) while the
  stored cards in the wild are 3.0; it now writes 3.0 without KIND.
- vitest with 10 tests over vcard.ts and ics.ts: escape/unescape round
  trip (backslash, semicolon, comma, newlines), UID generation, the
  3.0 shape, recurrence expansion inside a range and non-recurring
  filtering, and the empty result for unparseable input.
- Writing the tests caught a real UI bug: parseVCard lost newlines when
  unescaping (\n became a bare n), so notes with line breaks rendered
  wrong; it now unescapes per RFC 6350 (newline first, then the rest).
- CI web job runs npm test before the build.

Closes #23. Closes #24
@gnacho
gnacho merged commit 0e8cc87 into main Oct 17, 2026
4 checks passed
@gnacho
gnacho deleted the chore/ui-tests-vcard3 branch October 17, 2026 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unit tests for the web UI vCard/ICS helpers Web UI: write vCard 3.0 instead of 4.0

2 participants