@@ -147,15 +147,15 @@ void main() {
147147
148148 test ('inPendingSyncState works correctly' , () {
149149 when (() => mockChannel.joinRef).thenReturn ('channel_ref' );
150-
150+
151151 // Null joinRef
152152 presence.joinRef = null ;
153153 expect (presence.inPendingSyncState (), isTrue);
154-
154+
155155 // Different refs
156156 presence.joinRef = 'old_ref' ;
157157 expect (presence.inPendingSyncState (), isTrue);
158-
158+
159159 // Matching refs
160160 presence.joinRef = 'channel_ref' ;
161161 expect (presence.inPendingSyncState (), isFalse);
@@ -546,12 +546,16 @@ void main() {
546546 test ('handles joins with preservation and deduplication' , () {
547547 // Test simple preservation
548548 var state = < String , List <Presence >> {
549- 'user1' : [Presence .fromJson ({'presence_ref' : 'ref1' , 'user_id' : 1 })],
549+ 'user1' : [
550+ Presence .fromJson ({'presence_ref' : 'ref1' , 'user_id' : 1 })
551+ ],
550552 };
551553 var diff = < String , dynamic > {
552554 'joins' : < String , dynamic > {
553555 'user1' : < String , dynamic > {
554- 'metas' : [< String , dynamic > {'phx_ref' : 'ref2' , 'user_id' : 2 }],
556+ 'metas' : [
557+ < String , dynamic > {'phx_ref' : 'ref2' , 'user_id' : 2 }
558+ ],
555559 },
556560 },
557561 'leaves' : < String , dynamic > {},
@@ -573,7 +577,10 @@ void main() {
573577 'joins' : < String , dynamic > {
574578 'user1' : < String , dynamic > {
575579 'metas' : [
576- < String , dynamic > {'phx_ref' : 'ref1' , 'user_id' : 1 }, // Duplicate
580+ < String , dynamic > {
581+ 'phx_ref' : 'ref1' ,
582+ 'user_id' : 1
583+ }, // Duplicate
577584 < String , dynamic > {'phx_ref' : 'ref3' , 'user_id' : 3 }, // New
578585 ],
579586 },
@@ -683,7 +690,6 @@ void main() {
683690 expect (callbackLeftPresences! .length, 1 );
684691 expect (callbackLeftPresences! [0 ].presenceRef, 'ref1' );
685692 });
686-
687693 });
688694 });
689695
0 commit comments