carp-dk / carp-dk/carp_study_app

test: stream-driven tests for card view-models

Open
#645 0 comments 0 reactions 1 assignee Claimed by @Zeroupper View on GitHub
Dominant language
Dart
Stars
10
Forks
5
Avg merge
1d 3h
Merged PRs (30d)
14

Description

## Problem
(verified) The `samplingTable` double-count bug (`lib/view_models/cards/measurements_data_model.dart:22-29`) was invisible precisely because no test pushes synthetic measurements through these view-models; `test/heart_rate_data_model_test.dart` already shows the pattern (mocked controller + streams).

## Proposed fix
Reuse that harness for steps/activity/mobility/measurements after the leak-EPIC fixes; assert single-subscription behavior on re-init.

## Acceptance criteria
- [ ] Each card view-model has a test feeding >= 2 measurements and asserting counts and re-init behavior

**Effort:** M · **Priority:** P2 · **Change risk:** None

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.