Skip to content

Deterministic timer harness for testing Sub.Every apps #140

Description

@rorygraves

Background

Apps using Sub.Every (DigitalClock, SineWaveApp, RenderStressApp) can't be snapshot-tested today — time advances on a real scheduler. Current tests skip them.

Goal

A test harness that drives time virtually — advance by N ticks and observe frames, without real-time delays.

Scope

  1. Abstract the scheduler behind a Clock interface.
  2. ManualClock implementation that advances only on explicit calls.
  3. TuiTestDriver accepts a clock + exposes advanceTime(duration).
  4. Retroactively cover DigitalClock and SineWaveApp with snapshot tests.
  5. Document in RENDER_PIPELINE.md or a new test-harness doc.

Acceptance

  • ManualClock exists and is used by test driver.
  • DigitalClock has at least one snapshot test asserting time-advance behaviour.

Part of Cross-cutting — Semantic model & test debt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions