Test: adding checkpoint for ALL passing test

This commit is contained in:
Patrick Stewart 2024-10-06 00:47:27 -07:00
parent b2794f4f0b
commit f636c29fdf

View file

@ -117,19 +117,22 @@ void main() {
print("sendMessage was not called"); print("sendMessage was not called");
} }
// Print fired events for debugging // Filter out EmptyEvents and print fired events for debugging
print("Fired events:"); final significantEvents =
for (var event in firedEvents) { firedEvents.where((event) => event is! EmptyEvent).toList();
print("Fired events (excluding EmptyEvents):");
for (var event in significantEvents) {
print("${event.runtimeType}: ${event.toString()}"); print("${event.runtimeType}: ${event.toString()}");
} }
// Verify fired events // Verify fired events
expect(firedEvents, isNotEmpty, reason: "No events were fired"); expect(significantEvents, isNotEmpty,
expect(firedEvents.where((event) => event is JobQueueingEvent).length, reason: "No significant events were fired");
expect(significantEvents.where((event) => event is JobQueueingEvent).length,
equals(1), equals(1),
reason: "JobQueueingEvent was not fired exactly once"); reason: "JobQueueingEvent was not fired exactly once");
expect( expect(significantEvents.where((event) => event is JobQueuedEvent).length,
firedEvents.where((event) => event is JobQueuedEvent).length, equals(1), equals(1),
reason: "JobQueuedEvent was not fired exactly once"); reason: "JobQueuedEvent was not fired exactly once");
// Verify that no other methods were called on mq // Verify that no other methods were called on mq