elapse method
Lets duration pass — exactly that much — and whatever falls due in
it run. It does NOT wait for idle: use it to act in the middle of a
delay, then settle. On the real clock it really waits; under virtual
time the clock jumps.
Implementation
Future<void> elapse(Duration duration) {
_checkRunning();
if (duration.isNegative) {
throw ArgumentError.value(
duration, 'duration', 'juiceFlowTest: time cannot run backwards');
}
return _call(() => Future<void>.delayed(duration));
}