@@ -2088,7 +2088,6 @@ describe('ReactHooksWithNoopRenderer', () => {
20882088 ( ) => Scheduler . unstable_yieldValue ( 'Sync effect' ) ,
20892089 ) ;
20902090 expect ( Scheduler ) . toFlushAndYield ( [ 'a:one' , 'b:one' , 'Sync effect' ] ) ;
2091- ReactNoop . flushPassiveEffects ( ) ;
20922091
20932092 // Changing values should schedule an update with React.
20942093 // Start working on this update but don't finish it.
@@ -2108,9 +2107,7 @@ describe('ReactHooksWithNoopRenderer', () => {
21082107 } ) ;
21092108 expect ( Scheduler ) . toHaveYielded ( [ 'a:one' , 'b:one' , 'Sync effect' ] ) ;
21102109
2111- // TODO (useMutableSource) Re-enable the assertion below; it fails now for reasons unknown.
2112- // Once the update is processed, the new value should be used
2113- // expect(Scheduler).toFlushAndYield(['a:two', 'b:two']);
2110+ expect ( Scheduler ) . toFlushAndYield ( [ 'a:two' , 'b:two' ] ) ;
21142111 } ) ;
21152112
21162113 it ( 'should read from source on newly mounted subtree if no pending updates are scheduled for source' , ( ) => {
@@ -2170,6 +2167,12 @@ describe('ReactHooksWithNoopRenderer', () => {
21702167 } ) ;
21712168 expect ( Scheduler ) . toHaveYielded ( [ 'a:two' , 'b:two' , 'Sync effect' ] ) ;
21722169 } ) ;
2170+
2171+ // TODO (useMutableSource) Test case for a scoped subscription,
2172+ // followed by a render that reads from a different part of the store,
2173+ // with a mutation between its first and second read,
2174+ // that isn't picked up on by the scoped subscription,
2175+ // to verify that we also use the version number to protect against this case.
21732176 } ) ;
21742177
21752178 describe ( 'useCallback' , ( ) => {
0 commit comments