Skip to content

Commit 6ec98ee

Browse files
committed
msglist test [nfc]: Add test-todo on maintaining date separators
This test of how we maintain recipient headers through various changes had some lingering references to `canShareRecipientHeader`, which was recently split up and removed. Refresh the comments, and also add a TODO comment about writing a similar test (or perhaps extending this test) for date separators.
1 parent 96b2e2a commit 6ec98ee

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/model/message_list_test.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -689,16 +689,17 @@ void main() async {
689689
});
690690

691691
test('recipient headers are maintained consistently', () async {
692+
// TODO test date separators are maintained consistently too
692693
// This tests the code that maintains the invariant that recipient headers
693-
// are present just where [canShareRecipientHeader] requires them.
694+
// are present just where they're required.
694695
// In [checkInvariants] we check the current state against that invariant,
695696
// so here we just need to exercise that code through all the relevant cases.
696697
// Each [checkNotifiedOnce] call ensures there's been a [checkInvariants] call
697698
// (in the listener that increments [notifiedCount]).
698699
//
699-
// A separate unit test covers [canShareRecipientHeader] itself.
700-
// So this test just needs messages that can share, and messages that can't,
701-
// and doesn't need to exercise the different reasons that messages can't.
700+
// A separate unit test covers [haveSameRecipient] itself. So this test
701+
// just needs messages that have the same recipient, and that don't, and
702+
// doesn't need to exercise the different reasons that messages don't.
702703

703704
const timestamp = 1693602618;
704705
final stream = eg.stream();

0 commit comments

Comments
 (0)