fakeDelay top-level constant
Rule
const fakeDelay
Awaiting a fake timer the test never advances.
Implementation
const fakeDelay = Rule(
id: 'fake-delay',
severity: Severity.error,
title: 'Awaits a timer that only fake time can fire',
why:
'testWidgets runs the body in a FakeAsync zone. Future.delayed, '
'Future(...) and pumpEventQueue() schedule fake timers, which fire only '
'when the test pumps. While the body is awaiting one, nothing pumps, so '
'the await never returns.',
fix:
'Advance fake time with `await tester.pump(duration)` instead. If you '
'really need wall-clock time, wrap it in `tester.runAsync(...)`.',
);