Skip to content

Commit

Permalink
Add a null contains test (flutter#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoo authored May 2, 2020
1 parent e688459 commit 7803d61
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/map_matchers_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,19 @@ import 'test_utils.dart';
void main() {
test('contains', () {
shouldPass({'a': 1}, contains('a'));
shouldPass({null: 1}, contains(null));
shouldFail(
{'a': 1},
contains(2),
'Expected: contains <2> '
'Actual: {\'a\': 1}',
);
shouldFail(
{'a': 1},
contains(null),
'Expected: contains <null> '
'Actual: {\'a\': 1}',
);
});

test('containsValue', () {
Expand Down

0 comments on commit 7803d61

Please sign in to comment.