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:
@@ -30,6 +30,8 @@
|
||||
"dev": "vite",
|
||||
"build": "tsc -b && vite build",
|
||||
"lint": "eslint .",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"preview": "vite preview",
|
||||
"lint:fix": "eslint . --fix"
|
||||
},
|
||||
@@ -63,7 +65,8 @@
|
||||
"globals": "^16.5.0",
|
||||
"typescript": "~5.9.3",
|
||||
"typescript-eslint": "^8.48.0",
|
||||
"vite": "^7.3.1"
|
||||
"vite": "^7.3.1",
|
||||
"vitest": "^4.0.18"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
|
||||
Reference in New Issue
Block a user