@@ -403,6 +403,7 @@ test('Outer resolvers do not overwrite subscriptions made by inner resolvers (re
403403 } ) ;
404404
405405 TestRenderer . act ( ( ) => jest . runAllImmediates ( ) ) ;
406+ // $FlowFixMe[incompatible-use]
406407 expect ( renderer . toJSON ( ) ) . toEqual ( null ) ;
407408
408409 // Calling increment here should be ignored by Relay. However, if there are
@@ -411,19 +412,22 @@ test('Outer resolvers do not overwrite subscriptions made by inner resolvers (re
411412 GLOBAL_STORE . dispatch ( { type : 'INCREMENT' } ) ;
412413 } ) ;
413414 TestRenderer . act ( ( ) => jest . runAllImmediates ( ) ) ;
415+ // $FlowFixMe[incompatible-use]
414416 expect ( renderer . toJSON ( ) ) . toEqual ( null ) ;
415417
416418 // Revering optimistic update puts inner back into a state where its
417419 // fragment is valid. HOWEVER, if a dangling subscription has marked inner
418420 // as dirty, we will try to read from a LiveValue that does not exist.
419421 TestRenderer . act ( ( ) => update . dispose ( ) ) ;
422+ // $FlowFixMe[incompatible-use]
420423 expect ( renderer . toJSON ( ) ) . toEqual ( '1' ) ;
421424
422425 // Not part of the repro, but just to confirm: We should now be resubscribed...
423426 TestRenderer . act ( ( ) => {
424427 GLOBAL_STORE . dispatch ( { type : 'INCREMENT' } ) ;
425428 } ) ;
426429 TestRenderer . act ( ( ) => jest . runAllImmediates ( ) ) ;
430+ // $FlowFixMe[incompatible-use]
427431 expect ( renderer . toJSON ( ) ) . toEqual ( '2' ) ;
428432} ) ;
429433
@@ -496,6 +500,7 @@ test("Resolvers without fragments aren't reevaluated when their parent record up
496500 TestRenderer . act ( ( ) => jest . runAllImmediates ( ) ) ;
497501
498502 expect ( counterNoFragmentResolver . callCount ) . toBe ( initialCallCount + 1 ) ;
503+ // $FlowFixMe[incompatible-use]
499504 expect ( renderer . toJSON ( ) ) . toEqual ( '0' ) ;
500505} ) ;
501506
@@ -561,10 +566,12 @@ test('Can suspend', () => {
561566 } ) ;
562567 // If do not trigger `act` here, the renderer is still `0`. Probably, a React thing...
563568 TestRenderer . act ( ( ) => jest . runAllImmediates ( ) ) ;
569+ // $FlowFixMe[incompatible-use]
564570 expect ( renderer . toJSON ( ) ) . toEqual ( 'Loading...' ) ;
565571 TestRenderer . act ( ( ) => {
566572 GLOBAL_STORE . dispatch ( { type : 'INCREMENT' } ) ;
567573 } ) ;
574+ // $FlowFixMe[incompatible-use]
568575 expect ( renderer . toJSON ( ) ) . toEqual ( '2' ) ;
569576} ) ;
570577
@@ -633,10 +640,12 @@ test('Can suspend with resolver that uses live resolver', () => {
633640 } ) ;
634641 // If do not trigger `act` here, the renderer is still `0`. Probably, a React thing...
635642 TestRenderer . act ( ( ) => jest . runAllImmediates ( ) ) ;
643+ // $FlowFixMe[incompatible-use]
636644 expect ( renderer . toJSON ( ) ) . toEqual ( 'Loading...' ) ;
637645 TestRenderer . act ( ( ) => {
638646 GLOBAL_STORE . dispatch ( { type : 'INCREMENT' } ) ;
639647 } ) ;
648+ // $FlowFixMe[incompatible-use]
640649 expect ( renderer . toJSON ( ) ) . toEqual ( 'Alice 2' ) ;
641650 TestRenderer . act ( ( ) => {
642651 const operationDescriptor = createOperationDescriptor (
@@ -647,6 +656,7 @@ test('Can suspend with resolver that uses live resolver', () => {
647656 me : { id : '1' , name : 'Bob' , __typename : 'User' } ,
648657 } ) ;
649658 } ) ;
659+ // $FlowFixMe[incompatible-use]
650660 expect ( renderer . toJSON ( ) ) . toEqual ( 'Bob 2' ) ;
651661} ) ;
652662
@@ -1444,10 +1454,12 @@ describe('client-only fragments', () => {
14441454 GLOBAL_STORE . dispatch ( { type : 'INCREMENT' } ) ;
14451455 } ) ;
14461456 TestRenderer . act ( ( ) => jest . runAllImmediates ( ) ) ;
1457+ // $FlowFixMe[incompatible-use]
14471458 expect ( renderer . toJSON ( ) ) . toEqual ( 'Loading...' ) ;
14481459 TestRenderer . act ( ( ) => {
14491460 GLOBAL_STORE . dispatch ( { type : 'INCREMENT' } ) ;
14501461 } ) ;
1462+ // $FlowFixMe[incompatible-use]
14511463 expect ( renderer . toJSON ( ) ) . toEqual ( '2' ) ;
14521464 } ) ;
14531465
@@ -1477,6 +1489,7 @@ describe('client-only fragments', () => {
14771489 GLOBAL_STORE . dispatch ( { type : 'INCREMENT' } ) ;
14781490 } ) ;
14791491 TestRenderer . act ( ( ) => jest . runAllImmediates ( ) ) ;
1492+ // $FlowFixMe[incompatible-use]
14801493 expect ( renderer . toJSON ( ) ) . toEqual ( 'Loading...' ) ;
14811494 environment . applyUpdate ( {
14821495 storeUpdater : store => {
@@ -1490,6 +1503,7 @@ describe('client-only fragments', () => {
14901503 } ) . toThrowError (
14911504 'Unexpected LiveState value returned from Relay Resolver internal field `RELAY_RESOLVER_LIVE_STATE_VALUE`. It is likely a bug in Relay, or a corrupt state of the relay store state Field Path `counter_suspends_when_odd`. Record `{"__id":"client:1:counter_suspends_when_odd","__typename":"__RELAY_RESOLVER__","__resolverError":null,"__resolverValue":{"__LIVE_RESOLVER_SUSPENSE_SENTINEL":true},"__resolverLiveStateDirty":true}`.' ,
14921505 ) ;
1506+ // $FlowFixMe[incompatible-use]
14931507 expect ( renderer . toJSON ( ) ) . toEqual ( 'Loading...' ) ;
14941508 } ) ;
14951509} ) ;
0 commit comments