Background
This branch adds waitHelper.test.ts, introducing fake-clock-based unit tests for WaitHelper. The change highlights a gap: WaitHelper is a core utility for smoke tests, but previously lacked deterministic coverage for key async/timer behaviors, increasing regression and flakiness risk.
Problem
WaitHelper implementation contains async polling, timeout handling, interval/timeout cleanup, and error propagation logic. Without focused unit tests, behavior changes can slip in during refactors, especially around timing-sensitive paths.
Expected Behavior
WaitHelper behavior should be validated with deterministic tests that do not rely on real-time delays, covering success, timeout, and failure scenarios consistently.
Acceptance Criteria
Add fake-clock-driven tests for waitIsTrue success and timeout paths.
Add tests for waitConditionUntil covering:
immediate success on first check
eventual success after polling
null on timeout
rejection when condition throws
Ensure tests avoid real sleep/timing dependencies and are stable across runs.
Keep tests integrated with existing smoke test compile/CI flow.
Background
This branch adds waitHelper.test.ts, introducing fake-clock-based unit tests for WaitHelper. The change highlights a gap: WaitHelper is a core utility for smoke tests, but previously lacked deterministic coverage for key async/timer behaviors, increasing regression and flakiness risk.
Problem
WaitHelper implementation contains async polling, timeout handling, interval/timeout cleanup, and error propagation logic. Without focused unit tests, behavior changes can slip in during refactors, especially around timing-sensitive paths.
Expected Behavior
WaitHelper behavior should be validated with deterministic tests that do not rely on real-time delays, covering success, timeout, and failure scenarios consistently.
Acceptance Criteria
Add fake-clock-driven tests for waitIsTrue success and timeout paths.
Add tests for waitConditionUntil covering:
immediate success on first check
eventual success after polling
null on timeout
rejection when condition throws
Ensure tests avoid real sleep/timing dependencies and are stable across runs.
Keep tests integrated with existing smoke test compile/CI flow.