Skip to content

Commit

Permalink
msglist test: Consistently check whether listeners notified
Browse files Browse the repository at this point in the history
  • Loading branch information
gnprice committed Aug 4, 2023
1 parent bd22cd2 commit edb8820
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/model/message_list_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,12 @@ void main() async {
);

final messageList = await messageListViewWithMessages([originalMessage], stream, narrow);
bool listenersNotified = false;
messageList.addListener(() { listenersNotified = true; });

final message = messageList.messages.single;
messageList.maybeUpdateMessage(updateEvent);
check(listenersNotified).isTrue();
check(messageList.messages.single)
..identicalTo(message)
// Content is updated...
Expand Down

0 comments on commit edb8820

Please sign in to comment.