From 8e4a39d5603eb2776fad03f5bd3547fd1e7b175a Mon Sep 17 00:00:00 2001 From: Yusuke Mori Date: Wed, 1 Nov 2023 16:58:28 +0900 Subject: [PATCH] [fix] remove comparison of operationRequest --- .../test/isolate/isolate_client_test.dart | 57 ++++++++++++------- 1 file changed, 35 insertions(+), 22 deletions(-) diff --git a/packages/ferry/test/isolate/isolate_client_test.dart b/packages/ferry/test/isolate/isolate_client_test.dart index 0c81ea5f..e5f9d060 100644 --- a/packages/ferry/test/isolate/isolate_client_test.dart +++ b/packages/ferry/test/isolate/isolate_client_test.dart @@ -150,18 +150,26 @@ void main() { unawaited(expectLater( stream, emitsInOrder([ - OperationResponse( - data: GHumanWithArgsData((b) => b - ..human.id = '1' - ..human.name = 'Luke'), - dataSource: DataSource.Link, - operationRequest: req), - OperationResponse( - data: GHumanWithArgsData((b) => b - ..human.id = '2' - ..human.name = 'Bert'), - dataSource: DataSource.Cache, - operationRequest: req), + isA>() + .having( + (p) => p.data, + 'data', + GHumanWithArgsData((b) => b + ..human.id = '1' + ..human.name = 'Luke')) + .having((p) => p.linkException, 'linkException', isNull) + .having((p) => p.graphqlErrors, 'errors', isNull) + .having((p) => p.dataSource, 'source', DataSource.Link), + isA>() + .having( + (p) => p.data, + 'data', + GHumanWithArgsData((b) => b + ..human.id = '2' + ..human.name = 'Bert')) + .having((p) => p.linkException, 'linkException', isNull) + .having((p) => p.graphqlErrors, 'errors', isNull) + .having((p) => p.dataSource, 'source', DataSource.Cache), emitsDone, ]))); @@ -189,16 +197,21 @@ void main() { unawaited(expectLater( stream, emitsInOrder([ - OperationResponse( - data: GHumanWithArgsData((b) => b - ..human.id = '1' - ..human.name = 'Luke'), - dataSource: DataSource.Link, - operationRequest: req), - OperationResponse( - operationRequest: req, - data: null, - dataSource: DataSource.Cache), + isA>() + .having( + (p) => p.data, + 'data', + GHumanWithArgsData((b) => b + ..human.id = '1' + ..human.name = 'Luke')) + .having((p) => p.linkException, 'linkException', isNull) + .having((p) => p.graphqlErrors, 'errors', isNull) + .having((p) => p.dataSource, 'source', DataSource.Link), + isA>() + .having((p) => p.data, 'data', isNull) + .having((p) => p.linkException, 'linkException', isNull) + .having((p) => p.graphqlErrors, 'errors', isNull) + .having((p) => p.dataSource, 'source', DataSource.Cache), emitsDone, ])));