resolveHandler property

FutureOr<void> Function([TestItem?])? get resolveHandler

A function provided by the extension that the editor may call to request children of a test item, if the {@link TestItem.canResolveChildren} is true. When called, the item should discover children and call {@link TestController.createTestItem} as children are discovered.

Generally the extension manages the lifecycle of test items, but under certain conditions the editor may request the children of a specific item to be loaded. For example, if the user requests to re-run tests after reloading the editor, the editor may need to call this method to resolve the previously-run tests.

The item in the explorer will automatically be marked as "busy" until the function returns or the returned thenable resolves.

@param item An unresolved test item for which children are being requested, or undefined to resolve the controller's initial {@link TestController.items items}.

Implementation

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

Implementation

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