Skip to content

Commit

Permalink
[fix] remove comparison of operationRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
YusukeMoriJapan committed Nov 1, 2023
1 parent 01e2906 commit 8e4a39d
Showing 1 changed file with 35 additions and 22 deletions.
57 changes: 35 additions & 22 deletions packages/ferry/test/isolate/isolate_client_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<OperationResponse<GHumanWithArgsData, GHumanWithArgsVars>>()
.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<OperationResponse<GHumanWithArgsData, GHumanWithArgsVars>>()
.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,
])));

Expand Down Expand Up @@ -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<OperationResponse<GHumanWithArgsData, GHumanWithArgsVars>>()
.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<OperationResponse<GHumanWithArgsData?, GHumanWithArgsVars>>()
.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,
])));

Expand Down

0 comments on commit 8e4a39d

Please sign in to comment.