Skip to content

Commit c113458

Browse files
qbx2vincenzopalazzo
authored andcommitted
grahql: add partial unit test
1 parent 45f88f6 commit c113458

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/graphql/test/websocket_test.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,8 @@ Future<void> main() async {
613613
operation: Operation(document: gql('subscription {}')),
614614
);
615615
final waitForConnection = true;
616-
socketClient.subscribe(payload, waitForConnection);
616+
var subscription = socketClient.subscribe(payload, waitForConnection);
617+
var isEmpty = subscription.isEmpty;
617618

618619
await expectLater(
619620
socketClient.connectionState,
@@ -638,6 +639,8 @@ Future<void> main() async {
638639

639640
expect(
640641
socketClient.socketChannel!.closeCode, WebSocketStatus.normalClosure);
642+
643+
expect(await isEmpty.timeout(const Duration(seconds: 1)), true);
641644
});
642645
}, tags: "integration");
643646

0 commit comments

Comments
 (0)