|author||Nate Bosch <email@example.com>||Thu Dec 08 14:41:49 2022 -0800|
|committer||GitHub <firstname.lastname@example.org>||Thu Dec 08 14:41:49 2022 -0800|
Stop using deprecated errors (#201) Prepare for the errors to be removed from the SDK and stop referencing them entirely. Deprecate the matchers for these errors and change the types to target the more general `Error` and `TypeError` which will still catch the same situations. Move the ignore for same package deprecations to cover the entire test file.
Support for specifying test expectations, such as for unit tests.
The matcher library provides a third-generation assertion mechanism, drawing inspiration from Hamcrest.
For more information, see Unit Testing with Dart.
Matchers which have knowledge of the semantics that are tested are able to emit more meaningful messages which don't require reading test source to understand why the test failed. For instance compare the failures between
expect(someList.length, 1), and
// expect(someList.length, 1); Expected: <1> Actual: <2>
// expect(someList, hasLength(1)); Expected: an object with length of <1> Actual: ['expected value', 'unexpected value'] Which: has length of <2>