Skip to content

Commit

Permalink
fix list test for latest pkg:markdown (#2862)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzhiguang committed Nov 30, 2022
1 parent d58da50 commit 6d9f6c6
Showing 1 changed file with 29 additions and 12 deletions.
41 changes: 29 additions & 12 deletions packages/flutter_markdown/test/list_test.dart
Expand Up @@ -86,18 +86,35 @@ void defineTests() {
);

final Iterable<Widget> widgets = tester.allWidgets;
expectTextStrings(widgets, <String>[
'1.',
'Item 1',
'2.',
'Item 2',
'3.',
'Item 3',
'10.',
'Item 10',
'11.',
'Item 11'
]);
if (!newMarkdown) {
// For pkg:markdown <= v6.0.1
expectTextStrings(widgets, <String>[
'1.',
'Item 1',
'2.',
'Item 2',
'3.',
'Item 3',
'10.',
'Item 10',
'11.',
'Item 11'
]);
} else {
// For pkg:markdown > v6.0.1
expectTextStrings(widgets, <String>[
'1.',
'Item 1',
'2.',
'Item 2',
'3.',
'Item 3',
'4.',
'Item 10',
'5.',
'Item 11'
]);
}
},
);

Expand Down

0 comments on commit 6d9f6c6

Please sign in to comment.