---
id: w5/m1/t007
title: Test coverage
worker: worker5
status: done
estimate: 30m
depends_on: [w5/m1/t005]
---

## Objective

Add meaningful tests for the behavior this milestone shipped: a working, buildable app shell with one sample route — not a snapshot-everything or tautological test suite.

## Context

- `dashboard/` ships with Vitest already configured (`vitest.config.ts`, `test`/`test:coverage` scripts) and existing test patterns under `dashboard/src/routes/__tests__/` (e.g. `redirect-routes.test.ts`, `404-route.test.ts`) to follow for style.
- Meaningful coverage here means: the sample route from t004 actually renders its expected sample content, and routing/layout (root shell) doesn't silently break — not coverage-for-coverage's-sake on trivial getters/setters.

## Steps

1. Add a test asserting the sample route (t004) renders its expected sample content (e.g. the placeholder table has the expected rows/columns).
2. Keep/adapt any surviving generic tests (root layout, 404, redirects) that still apply after t002's deletions; remove ones that only tested deleted beancount features.
3. Run `yarn test` (or `yarn test:coverage`) and confirm it passes.

## Files

- `dashboard/src/routes/__tests__/` (add/adapt)
- `dashboard/src/test/` (shared test setup, if needed)

## Acceptance criteria

- [ ] At least one test asserts the sample route's actual rendered content (fails if the sample content regresses).
- [ ] `yarn test` passes with no leftover tests referencing deleted beancount features.

## Out of scope

- Testing against a real `bex-api` backend — no such wiring exists yet in this milestone.
