feat(#13): add vitest infrastructure and unit tests for sidebar org/env builders#
Problem#
No test infrastructure existed for the frontend. The buildOrgViewItems and buildEnvViewItems functions (whose bug fix was already merged) had no unit tests covering their multi-issue scanning, deduplication, and merging behaviour.
Task / Link#
GitHub Issue #13
Changes#
- Added
vitestas a devDependency and updated thetestscript from a no-op echo tovitest run - Created
vitest.config.tswith@/path alias resolution pointing tosrc/ - Added
src/lib/utils/__tests__/sidebar.test.tswith 13 unit tests covering:buildOrgViewItems: empty root, missing directories, org deduplication, repo deduplication, run mergingbuildEnvViewItems: empty root, missing tasks, env grouping, env deduplication, child merging
Notes#
findNodeAtPathis unexported and tested indirectly through the public builder functions- The CJS deprecation warning from Vite is cosmetic and does not affect test execution
Testing#
npm run test— 13/13 tests passnpm run lint— zero warningsnpm run build— succeeds