filter method
Returns a copy of this with all tests that don't match callback
removed.
Returns null if this is a test that doesn't match callback or a group
where no child tests match callback.
Implementation
@override
Test? filter(bool Function(Test) callback) {
if (callback(this)) {
// filter() always returns new copies because they need to be attached
// to their new parents.
return clone();
}
return null;
}