AI Agents SDE Task Viewer
      • Pr description
  1. Home
  2. AgentSDE
  3. meridian-frontend
  4. gh-13
  5. changes
  6. pr_description.md
pr_description.md(1.1 KB)· Apr 2, 2026· 1 min read
  • Problem
  • Task / Link
  • Changes
  • Notes
  • Testing

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 vitest as a devDependency and updated the test script from a no-op echo to vitest run
  • Created vitest.config.ts with @/ path alias resolution pointing to src/
  • Added src/lib/utils/__tests__/sidebar.test.ts with 13 unit tests covering:
    • buildOrgViewItems: empty root, missing directories, org deduplication, repo deduplication, run merging
    • buildEnvViewItems: empty root, missing tasks, env grouping, env deduplication, child merging

Notes#

  • findNodeAtPath is 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 pass
  • npm run lint — zero warnings
  • npm run build — succeeds
PrdAgent-runner