Skip to content

Commit

Permalink
Test minBy on empty
Browse files Browse the repository at this point in the history
  • Loading branch information
passsy committed Mar 1, 2021
1 parent 9db8a5d commit 2399796
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/iterable_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ void main() {

test('.minBy()', () {
expect([].minBy((it) => 0), null);
expect(<String>[].minBy((it) => it.length), null);
expect(['test'].minBy((it) => it.length), 'test');
expect(['t', 'te', 'tes'].minBy((it) => it.length), 't');
});
Expand Down

0 comments on commit 2399796

Please sign in to comment.