Skip to content

[TEST-06] web and client crates have low test density relative to size #343

@intendednull

Description

@intendednull

Audit finding from #300 (commit 679f9fe)

Severity: low
Category: test coverage
File: crates/web (352 tests / 19947 SLOC, ratio 0.0177); crates/client (216 / 15459, ratio 0.0140)
Obvious fix: no (requires module-level triage)

Description

In absolute terms these crates have the most tests in the workspace, but per-SLOC they sit in the lower third. Given they are the largest crates and the user-facing surface, the e2e suite under e2e/ (Playwright specs) partially compensates. Still worth a targeted pass: the ratio suggests integration paths are thinly covered relative to widget/render code.

Impact / Threat

Integration paths in web/client may regress without unit-level coverage to localize failures.

Suggested fix

Identify modules in client and web with zero #[test] (e.g. via rg -L '#\[test\]' crates/client/src crates/web/src) and prioritize tests for: (1) join-link parsing edge cases mirroring the e2e/join-links.spec.ts spec at the unit level, (2) permission-state transitions mirroring e2e/permissions.spec.ts, (3) worker-node lifecycle hooks mirroring e2e/worker-nodes.spec.ts.

Verify

rg -c '#\[(tokio::|wasm_bindgen_)?test\]' crates/web/ crates/client/
find crates/web/src crates/client/src -name '*.rs' | xargs wc -l | tail -1

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions