Skip to content

test: unit tests for the services extracted in #597 #644

Description

@Zeroupper

Update (post-#597 merge)

test/services_test.dart now covers most of the originally-scoped services:

  • MessageService — refresh sort/count, failure keeps old list, polling idempotency + stop, dispose safety
  • AuthService — signed-out vs signed-in username, auth-state delegation, invitation filtering
  • ConsentService — backend-vs-local branching, caching, accept-notifies, backend failure paths
  • StudyService — capability queries, deploy/start no-ops, persistence, retryable configure

The originally-cited gaps (hasInformedConsentBeenAccepted backend-vs-local branching, message-refresh failure) are now asserted.

Remaining work

  • Add an explicit ≥80% line-coverage assertion/gate per extracted service (currently behaviourally covered, not measured)
  • Extract shared fixtures/mocks into a common test harness (dedupe across services_test.dart / view_models_test.dart)

Effort: S · Priority: P1 · Change risk: None

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions