Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/event_source_client/lib/src/test_sse_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ final class TestSseClient implements SSEClient {
bool hasCapability(SSECapability capability) =>
_capabilities.contains(capability);

/// Whether [close] has been called on this client. Test-only --
/// production [SSEClient] implementations do not expose this state,
/// and tests asserting against it are inherently white-box. Use to
/// verify that code under test correctly tears the connection down.
bool get isClosed => _messageEventsController.isClosed;

/// Emit an event on the stream.
/// Has no effect if the client has been closed.
///
Expand Down
Loading