Skip to content

Commit 5a6813d

Browse files
committed
Drop some redudnant which
1 parent 673d5f4 commit 5a6813d

5 files changed

Lines changed: 6 additions & 8 deletions

File tree

‎pkgs/checks/lib/src/extensions/iterable.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ extension IterableChecks<T> on Subject<Iterable<T>> {
7171
predicateNoun: () => 'a non-empty iterable',
7272
(actual) {
7373
if (actual.isNotEmpty) return null;
74-
return Rejection(which: ['is empty']);
74+
return Rejection();
7575
},
7676
);
7777
}

‎pkgs/checks/lib/src/extensions/string.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ extension StringChecks on Subject<String> {
4545
predicateNoun: () => 'a non-empty string',
4646
(actual) {
4747
if (actual.isNotEmpty) return null;
48-
return Rejection(which: ['is empty']);
48+
return Rejection();
4949
},
5050
);
5151
}

‎pkgs/checks/test/collapsed_failure_message_test.dart‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,7 @@ Which: does not contain 'bar'""");
238238
check('').isNotEmpty();
239239
}).throwsFailure().equals('''
240240
Expected: a non-empty string
241-
Actual: ''
242-
Which: is empty''');
241+
Actual: \'\'''');
243242
});
244243

245244
test('startsWith', () {
@@ -297,8 +296,7 @@ Which: is not empty''');
297296
check(<int>[]).isNotEmpty();
298297
}).throwsFailure().equals('''
299298
Expected: a non-empty iterable
300-
Actual: []
301-
Which: is empty''');
299+
Actual: []''');
302300
});
303301

304302
test('contains', () {

‎pkgs/checks/test/extensions/iterable_test.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ void main() {
6464
check(_testIterable).isNotEmpty();
6565
check(
6666
const Iterable<int>.empty(),
67-
).isRejectedBy((it) => it.isNotEmpty(), which: ['is empty']);
67+
).isRejectedBy((it) => it.isNotEmpty());
6868
});
6969

7070
test('contains', () {

‎pkgs/checks/test/extensions/string_test.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ void main() {
2525
});
2626
test('isNotEmpty', () {
2727
check('bob').isNotEmpty();
28-
check('').isRejectedBy((it) => it.isNotEmpty(), which: ['is empty']);
28+
check('').isRejectedBy((it) => it.isNotEmpty());
2929
});
3030
test('startsWith', () {
3131
check('bob').startsWith('bo');

0 commit comments

Comments
 (0)