matcher
matcher copied to clipboard
A declarative API for specifying expectations.
We may want to disable the `deprecated_member_use_from_same_package` lint? ``` info - test/expect_async_test.dart:340:9 - 'expectAsync' is deprecated and shouldn't be used. Will be removed in 0.13.0. Try replacing the use of...
This would not necessarily contain breaking changes; publishing `1.0.0` would just indicate the maturity and support of this package.
I don't have time to create a full PR with tests, but here's a repro and a patch if someone has the time to integrate them. I believe this is...
Per https://github.com/dart-lang/sdk/issues/32559 `MapEntry` does not implement `operator==` or `hashCode`; it would be useful to support it in `package:matcher`, e.g. default deep equals.
I don't have time to create a minimal repro right now, but writing this down so it doesn't get lost. It looks like an iterable that doesn't always return the...
```dart extension CombineMatchers on Matcher { Matcher operator &(Matcher other) => allOf(this, other); } ``` Before: ```dart // Multiple expect calls: expect(someList, hasLength(3)); expect(someList, contains(1)); // Or use `allOf` expect(someList,...
With matchers like `unordered` and `containsAll`, if the value that it is matched against has a different length (or is shorter in case of `containsAll`) than the expected value, the...
`CastError` is [deprecated](https://github.com/dart-lang/sdk/issues/40763) and all implementations will start throwing an implementation object that implements `TypeError` instead. Consider adding a matcher `isTypeError`, and possibly deprecating `isCastError` as well?
@kevmoo @natebosch Based on our meeting today, Flutter is hiding `TypeMatcher` and `isInstanceOf` from `test` in all our tests (and in the `flutter_test` package that we export to our users),...
These matchers, when used in `expect` calls, don't add value over literal boolean values. If there aren't other places which is seeing value from these we should deprecate and eventually...