runAsync<T> method
Runs asynchronous body with this tester's terminal active.
The previously active terminal is restored after the returned future completes, whether it succeeds or fails.
Implementation
Future<T> runAsync<T>(FutureOr<T> Function(Terminice t) body) {
return TerminalContext.runWithAsync(terminal, () => body(terminice));
}