avoid-duplicate-test-assertions
preset: recommended
Warns when a test case has multiple test assertions with the same expression and expected value.
Example
❌ Bad:
void withEmpty() {
final array = [1, 2, 3];
expect(array, isEmpty);
expect(array, isEmpty); // LINT
}
✅ Good:
void withEmpty() {
final array = [1, 2, 3];
expect(array, isEmpty);
expect(array, contains(1));
}