refreshHandler property

FutureOr<void> Function(CancellationToken)? get refreshHandler

If this method is present, a refresh button will be present in the UI, and this method will be invoked when it's clicked. When called, the extension should scan the workspace for any new, changed, or removed tests.

It's recommended that extensions try to update tests in realtime, using a {@link FileSystemWatcher} for example, and use this method as a fallback.

@returns A thenable that resolves when tests have been refreshed.

Implementation

_i4.FutureOr<void> Function(_i3.CancellationToken)? get refreshHandler =>
    (_i3.CancellationToken p0) => _i5.callMethod(
          _i5.getProperty(
            this,
            'refreshHandler',
          ),
          r'call',
          [
            this,
            p0,
          ],
        );
set refreshHandler (FutureOr<void> value(CancellationToken)?)

Implementation

set refreshHandler(
    _i4.FutureOr<void> Function(_i3.CancellationToken)? value) {
  _i5.setProperty(
    this,
    'refreshHandler',
    value == null
        ? _i6.undefined
        : _i5.allowInterop((p0) => _i6.Promise.futureOr(() => value(p0))),
  );
}