---
id: w5/m5/t006
title: Test coverage
worker: worker5
status: done
estimate: 30m
depends_on: [w5/m5/t003, w5/m5/t004]
---

## Objective

Add meaningful tests for m5: the `server(id)` → overview mapping, the nav routing (overview resolves under the layout; service-nav targets), and the header lifecycle actions. Assert real behavior and failure modes.

## Context

- Test convention: adjacent `__tests__` dirs; vitest setup in `src/test/`.
- Router tests: assert the overview index resolves under the layout route.

## Steps

1. Test `server(id)` → overview field mapping (including string `suspended`).
2. Test that `/services/$serviceId` (overview) resolves under the layout; service nav points at the right routes.
3. Test the header lifecycle action fires + converges.

## Files

- `src/features/services/**/__tests__/*.test.ts(x)`
- route tests under `src/routes/__tests__/`

## Acceptance criteria

- [x] Tests assert overview mapping, nav routing, and header actions.
- [x] `yarn test` passes.

## Out of scope

- Logs tab behavior (m6).
