filter method

Suite filter(
  1. bool callback(
    1. Test
    )
)

Returns a new suite with all tests matching test removed.

Unlike GroupEntry.filter, this never returns null. If all entries are filtered out, it returns an empty suite.

Implementation

Suite filter(bool Function(Test) callback) {
  var filtered = group.filter(callback);
  filtered ??= Group.root([], metadata: metadata);
  return Suite(
    filtered,
    platform,
    ignoreTimeouts: ignoreTimeouts,
    path: path,
  );
}