@@ -225,21 +225,25 @@ void main() {
225225
226226 await Future .delayed (Duration (milliseconds: 50 ));
227227
228- expect (resultList.length, equals (1 ), reason: 'First event should be processed immediately' );
228+ expect (resultList.length, equals (1 ),
229+ reason: 'First event should be processed immediately' );
229230 expect (resultList[0 ].content, equals ('content1' ));
230231
231232 controller.add (createMockEvent ('2' ));
232233
233234 await Future .delayed (Duration (milliseconds: 50 ));
234235
235- expect (resultList.length, equals (2 ), reason: 'Second event should be processed immediately' );
236+ expect (resultList.length, equals (2 ),
237+ reason: 'Second event should be processed immediately' );
236238 expect (resultList[1 ].content, equals ('content2' ));
237239
238240 await subscription.cancel ();
239241 await controller.close ();
240242 });
241243
242- test ('should process events from non-closing stream with fewer events than maxConcurrent' , () async {
244+ test (
245+ 'should process events from non-closing stream with fewer events than maxConcurrent' ,
246+ () async {
243247 final controller = StreamController <Nip01Event >();
244248 final resultList = < Nip01Event > [];
245249
@@ -259,7 +263,9 @@ void main() {
259263
260264 await Future .delayed (Duration (milliseconds: 100 ));
261265
262- expect (resultList.length, equals (3 ), reason: 'All events should be processed even when count < maxConcurrent' );
266+ expect (resultList.length, equals (3 ),
267+ reason:
268+ 'All events should be processed even when count < maxConcurrent' );
263269
264270 await subscription.cancel ();
265271 await controller.close ();
@@ -286,8 +292,10 @@ void main() {
286292
287293 await Future .delayed (Duration (milliseconds: 50 ));
288294
289- expect (resultList.length, equals (1 ), reason: 'Fast event should complete first' );
290- expect (resultList[0 ].content, equals ('contentfast' ), reason: 'Fast event should be yielded before slow event' );
295+ expect (resultList.length, equals (1 ),
296+ reason: 'Fast event should complete first' );
297+ expect (resultList[0 ].content, equals ('contentfast' ),
298+ reason: 'Fast event should be yielded before slow event' );
291299
292300 await Future .delayed (Duration (milliseconds: 80 ));
293301
@@ -298,7 +306,8 @@ void main() {
298306 await controller.close ();
299307 });
300308
301- test ('should handle continuous stream of events without blocking' , () async {
309+ test ('should handle continuous stream of events without blocking' ,
310+ () async {
302311 final controller = StreamController <Nip01Event >();
303312 final resultList = < Nip01Event > [];
304313
@@ -319,19 +328,23 @@ void main() {
319328
320329 if (i >= 2 ) {
321330 expect (resultList.length, greaterThan (0 ),
322- reason: 'Events should be processed continuously, not waiting for stream end' );
331+ reason:
332+ 'Events should be processed continuously, not waiting for stream end' );
323333 }
324334 }
325335
326336 await Future .delayed (Duration (milliseconds: 100 ));
327337
328- expect (resultList.length, equals (10 ), reason: 'All events should be processed from continuous stream' );
338+ expect (resultList.length, equals (10 ),
339+ reason: 'All events should be processed from continuous stream' );
329340
330341 await subscription.cancel ();
331342 await controller.close ();
332343 });
333344
334- test ('should not deadlock when maxConcurrent is reached with non-closing stream' , () async {
345+ test (
346+ 'should not deadlock when maxConcurrent is reached with non-closing stream' ,
347+ () async {
335348 final controller = StreamController <Nip01Event >();
336349 final resultList = < Nip01Event > [];
337350
@@ -352,13 +365,15 @@ void main() {
352365
353366 await Future .delayed (Duration (milliseconds: 200 ));
354367
355- expect (resultList.length, equals (4 ), reason: 'Should process all events without deadlocking' );
368+ expect (resultList.length, equals (4 ),
369+ reason: 'Should process all events without deadlocking' );
356370
357371 await subscription.cancel ();
358372 await controller.close ();
359373 });
360374
361- test ('should yield events immediately upon verification completion' , () async {
375+ test ('should yield events immediately upon verification completion' ,
376+ () async {
362377 final controller = StreamController <Nip01Event >();
363378 final resultTimes = < DateTime > [];
364379
@@ -386,7 +401,9 @@ void main() {
386401
387402 for (int i = 0 ; i < resultTimes.length; i++ ) {
388403 final timeDiff = resultTimes[i].difference (startTime).inMilliseconds;
389- expect (timeDiff, lessThan (200 ), reason: 'Event $i should be processed within 200ms, was ${timeDiff }ms' );
404+ expect (timeDiff, lessThan (200 ),
405+ reason:
406+ 'Event $i should be processed within 200ms, was ${timeDiff }ms' );
390407 }
391408
392409 await subscription.cancel ();
0 commit comments