@@ -2016,7 +2016,6 @@ describe('ReactHooksWithNoopRenderer', () => {
20162016 ( ) => Scheduler . unstable_yieldValue ( 'Sync effect' ) ,
20172017 ) ;
20182018 expect ( Scheduler ) . toFlushAndYield ( [ 'a:one' , 'b:one' , 'Sync effect' ] ) ;
2019- ReactNoop . flushPassiveEffects ( ) ;
20202019
20212020 // Changing values should schedule an update with React.
20222021 // Start working on this update but don't finish it.
@@ -2036,9 +2035,7 @@ describe('ReactHooksWithNoopRenderer', () => {
20362035 } ) ;
20372036 expect ( Scheduler ) . toHaveYielded ( [ 'a:one' , 'b:one' , 'Sync effect' ] ) ;
20382037
2039- // TODO (useMutableSource) Re-enable the assertion below; it fails now for reasons unknown.
2040- // Once the update is processed, the new value should be used
2041- // expect(Scheduler).toFlushAndYield(['a:two', 'b:two']);
2038+ expect ( Scheduler ) . toFlushAndYield ( [ 'a:two' , 'b:two' ] ) ;
20422039 } ) ;
20432040
20442041 it ( 'should read from source on newly mounted subtree if no pending updates are scheduled for source' , ( ) => {
@@ -2098,6 +2095,12 @@ describe('ReactHooksWithNoopRenderer', () => {
20982095 } ) ;
20992096 expect ( Scheduler ) . toHaveYielded ( [ 'a:two' , 'b:two' , 'Sync effect' ] ) ;
21002097 } ) ;
2098+
2099+ // TODO (useMutableSource) Test case for a scoped subscription,
2100+ // followed by a render that reads from a different part of the store,
2101+ // with a mutation between its first and second read,
2102+ // that isn't picked up on by the scoped subscription,
2103+ // to verify that we also use the version number to protect against this case.
21012104 } ) ;
21022105
21032106 describe ( 'useCallback' , ( ) => {
0 commit comments