feat: add Vitest unit tests for utility functions

- Set up Vitest with 27 tests across 3 test suites
- relativeTime: edge cases, time buckets, future timestamps
- sessionDisplayName: labels, kinds, channels, UUID truncation
- messagesToMarkdown: roles, blocks, tool calls, system events
- Add test and test:watch npm scripts
- Add test step to CI workflow
This commit is contained in:
Nicolas Varrot
2026-02-13 06:58:39 +00:00
parent f05db6aa6d
commit c4725e65c2
6 changed files with 558 additions and 2 deletions

View File

@@ -28,6 +28,9 @@ jobs:
- name: Lint
run: npm run lint
- name: Test
run: npm test
- name: Type check
run: npx tsc --noEmit