Skip to content

Minimal unit test coverage: no tests for transforms, sensors, networking, or Signal K #920

@mairas

Description

@mairas

Description

The project has only 6 test files covering:

  • CRGB color type
  • ValueProducer lifecycle
  • Event loop initialization
  • LED blinker patterns
  • TaskQueueProducer
  • Basic offline functionality

Not tested: Any transform, any sensor, Signal K protocol, networking, configuration persistence, JSON serialization, or the entire connect_to pipeline.

Given the number of correctness bugs found in this review (variable shadowing, assignment typos, buffer resize bugs, uninitialized values), the lack of unit tests for transforms is a significant risk.

Recommendation

Priority areas for test coverage:

  1. Transforms -- especially CurveInterpolator, MovingAverage, LambdaTransform, Hysteresis, Frequency
  2. JSON serialization -- to_json/from_json round-trip tests for all configurable objects
  3. Nullable -- edge cases for each type specialization
  4. Multi-input transforms -- once a unified pattern is designed (see No unified multi-input transform pattern (three inconsistent approaches) #899)

Found during code review (2026-03-25)

Metadata

Metadata

Assignees

No one assigned

    Labels

    code reviewFinding from code reviewtechnical debtArchitectural improvement or cleanup

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions