Skip to content

test: stream-driven tests for card view-models #645

Description

@Zeroupper

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

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