@@ -2016,7 +2016,6 @@ describe('ReactHooksWithNoopRenderer', () => {
2016
2016
( ) => Scheduler . unstable_yieldValue ( 'Sync effect' ) ,
2017
2017
) ;
2018
2018
expect ( Scheduler ) . toFlushAndYield ( [ 'a:one' , 'b:one' , 'Sync effect' ] ) ;
2019
- ReactNoop . flushPassiveEffects ( ) ;
2020
2019
2021
2020
// Changing values should schedule an update with React.
2022
2021
// Start working on this update but don't finish it.
@@ -2036,9 +2035,7 @@ describe('ReactHooksWithNoopRenderer', () => {
2036
2035
} ) ;
2037
2036
expect ( Scheduler ) . toHaveYielded ( [ 'a:one' , 'b:one' , 'Sync effect' ] ) ;
2038
2037
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' ] ) ;
2042
2039
} ) ;
2043
2040
2044
2041
it ( 'should read from source on newly mounted subtree if no pending updates are scheduled for source' , ( ) => {
@@ -2098,6 +2095,12 @@ describe('ReactHooksWithNoopRenderer', () => {
2098
2095
} ) ;
2099
2096
expect ( Scheduler ) . toHaveYielded ( [ 'a:two' , 'b:two' , 'Sync effect' ] ) ;
2100
2097
} ) ;
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.
2101
2104
} ) ;
2102
2105
2103
2106
describe ( 'useCallback' , ( ) => {
0 commit comments