@@ -4079,12 +4079,14 @@ describe("useQuery Hook", () => {
4079
4079
errors : [ new GraphQLError ( "Intentional error" ) ] ,
4080
4080
} ,
4081
4081
maxUsageCount : Number . POSITIVE_INFINITY ,
4082
+ delay : 20 ,
4082
4083
} ,
4083
4084
{
4084
4085
request : { query : query2 , variables : { id : 1 } } ,
4085
4086
result : {
4086
4087
data : { person : { __typename : "Person" , id : 1 , lastName : "Doe" } } ,
4087
4088
} ,
4089
+ delay : 20 ,
4088
4090
} ,
4089
4091
] ) ,
4090
4092
cache : new InMemoryCache ( ) ,
@@ -4167,28 +4169,24 @@ describe("useQuery Hook", () => {
4167
4169
4168
4170
await act ( ( ) => user . click ( screen . getByText ( "Run 2nd query" ) ) ) ;
4169
4171
4170
- if ( React . version . startsWith ( "17" ) ) {
4171
- {
4172
- const { snapshot } = await Profiler . takeRender ( ) ;
4172
+ {
4173
+ const { snapshot } = await Profiler . takeRender ( ) ;
4173
4174
4174
- expect ( snapshot . useQueryResult ) . toMatchObject ( {
4175
- data : undefined ,
4176
- error : new ApolloError ( {
4177
- graphQLErrors : [ new GraphQLError ( "Intentional error" ) ] ,
4178
- } ) ,
4179
- loading : false ,
4180
- networkStatus : NetworkStatus . error ,
4181
- } ) ;
4175
+ expect ( snapshot . useQueryResult ) . toMatchObject ( {
4176
+ data : undefined ,
4177
+ error : new ApolloError ( {
4178
+ graphQLErrors : [ new GraphQLError ( "Intentional error" ) ] ,
4179
+ } ) ,
4180
+ loading : false ,
4181
+ networkStatus : NetworkStatus . error ,
4182
+ } ) ;
4182
4183
4183
- // React 17 contains this additional render that we do not see on React
4184
- // 18
4185
- expect ( snapshot . useLazyQueryResult ) . toMatchObject ( {
4186
- called : true ,
4187
- data : undefined ,
4188
- loading : true ,
4189
- networkStatus : NetworkStatus . loading ,
4190
- } ) ;
4191
- }
4184
+ expect ( snapshot . useLazyQueryResult ) . toMatchObject ( {
4185
+ called : true ,
4186
+ data : undefined ,
4187
+ loading : true ,
4188
+ networkStatus : NetworkStatus . loading ,
4189
+ } ) ;
4192
4190
}
4193
4191
4194
4192
{
@@ -4228,7 +4226,7 @@ describe("useQuery Hook", () => {
4228
4226
4229
4227
await act ( ( ) => user . click ( screen . getByText ( "Reload 1st query" ) ) ) ;
4230
4228
4231
- if ( React . version . startsWith ( "17" ) ) {
4229
+ {
4232
4230
const { snapshot } = await Profiler . takeRender ( ) ;
4233
4231
4234
4232
expect ( snapshot . useQueryResult ) . toMatchObject ( {
0 commit comments