update method

Future<bool> update([
  1. void runAndTrackSideEffects()?
])

Returns a future that completes after processing DOM update events.

If true is returned, calling update again may be required to get to a completely stable state. See NgTestStabilizer.stabilize.

runAndTrackSideEffects may optionally be specified:

@override
Future<bool> update([void fn()]) async {
  // Track the results of running fn, which may spawn async events.
  _zone.run(fn);

  // Now wait until we know those events are done.
  await _waitUntilZoneStable();
  return true;
}

Implementation

Future<bool> update([void Function()? runAndTrackSideEffects]) {
  return Future<bool>.sync(() {
    if (runAndTrackSideEffects != null) {
      runAndTrackSideEffects();
    }
    return false;
  });
}