carp-dk / carp-dk/carp_study_app
test: unit tests for the services extracted in #597
- Dominant language
- Dart
- Stars
- 10
- Forks
- 5
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 14
Description
## 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
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.