@@ -1867,7 +1867,8 @@ describe('ReactSuspenseWithNoopRenderer', () => {
1867
1867
expect ( ReactNoop . getChildren ( ) ) . toEqual ( [ span ( 'Loading...' ) ] ) ;
1868
1868
} ) ;
1869
1869
1870
- it ( 'warns when a low priority update suspends inside a high priority update for functional components' , async ( ) => {
1870
+ // TODO: flip to "warns" when this is implemented again.
1871
+ it ( 'does not warn when a low priority update suspends inside a high priority update for functional components' , async ( ) => {
1871
1872
let _setShow ;
1872
1873
function App ( ) {
1873
1874
let [ show , setShow ] = React . useState ( false ) ;
@@ -1883,20 +1884,17 @@ describe('ReactSuspenseWithNoopRenderer', () => {
1883
1884
ReactNoop . render ( < App /> ) ;
1884
1885
} ) ;
1885
1886
1886
- expect ( ( ) => {
1887
- ReactNoop . act ( ( ) => {
1888
- Scheduler . unstable_runWithPriority (
1889
- Scheduler . unstable_UserBlockingPriority ,
1890
- ( ) => _setShow ( true ) ,
1891
- ) ;
1892
- } ) ;
1893
- } ) . toErrorDev (
1894
- 'Warning: App triggered a user-blocking update that suspended.' + '\n\n' ,
1895
- { withoutStack : true } ,
1896
- ) ;
1887
+ // TODO: assert toErrorDev() when the warning is implemented again.
1888
+ ReactNoop . act ( ( ) => {
1889
+ Scheduler . unstable_runWithPriority (
1890
+ Scheduler . unstable_UserBlockingPriority ,
1891
+ ( ) => _setShow ( true ) ,
1892
+ ) ;
1893
+ } ) ;
1897
1894
} ) ;
1898
1895
1899
- it ( 'warns when a low priority update suspends inside a high priority update for class components' , async ( ) => {
1896
+ // TODO: flip to "warns" when this is implemented again.
1897
+ it ( 'does not warn when a low priority update suspends inside a high priority update for class components' , async ( ) => {
1900
1898
let show ;
1901
1899
class App extends React . Component {
1902
1900
state = { show : false } ;
@@ -1915,17 +1913,13 @@ describe('ReactSuspenseWithNoopRenderer', () => {
1915
1913
ReactNoop . render ( < App /> ) ;
1916
1914
} ) ;
1917
1915
1918
- expect ( ( ) => {
1919
- ReactNoop . act ( ( ) => {
1920
- Scheduler . unstable_runWithPriority (
1921
- Scheduler . unstable_UserBlockingPriority ,
1922
- ( ) => show ( ) ,
1923
- ) ;
1924
- } ) ;
1925
- } ) . toErrorDev (
1926
- 'Warning: App triggered a user-blocking update that suspended.' + '\n\n' ,
1927
- { withoutStack : true } ,
1928
- ) ;
1916
+ // TODO: assert toErrorDev() when the warning is implemented again.
1917
+ ReactNoop . act ( ( ) => {
1918
+ Scheduler . unstable_runWithPriority (
1919
+ Scheduler . unstable_UserBlockingPriority ,
1920
+ ( ) => show ( ) ,
1921
+ ) ;
1922
+ } ) ;
1929
1923
} ) ;
1930
1924
1931
1925
it ( 'does not warn about wrong Suspense priority if no new fallbacks are shown' , async ( ) => {
@@ -1961,8 +1955,9 @@ describe('ReactSuspenseWithNoopRenderer', () => {
1961
1955
expect ( Scheduler ) . toHaveYielded ( [ 'Suspend! [A]' , 'Suspend! [B]' ] ) ;
1962
1956
} ) ;
1963
1957
1958
+ // TODO: flip to "warns" when this is implemented again.
1964
1959
it (
1965
- 'warns when component that triggered user-blocking update is between Suspense boundary ' +
1960
+ 'does not warn when component that triggered user-blocking update is between Suspense boundary ' +
1966
1961
'and component that suspended' ,
1967
1962
async ( ) => {
1968
1963
let _setShow ;
@@ -1982,17 +1977,13 @@ describe('ReactSuspenseWithNoopRenderer', () => {
1982
1977
ReactNoop . render ( < App /> ) ;
1983
1978
} ) ;
1984
1979
1985
- expect ( ( ) => {
1986
- ReactNoop . act ( ( ) => {
1987
- Scheduler . unstable_runWithPriority (
1988
- Scheduler . unstable_UserBlockingPriority ,
1989
- ( ) => _setShow ( true ) ,
1990
- ) ;
1991
- } ) ;
1992
- } ) . toErrorDev (
1993
- 'Warning: A triggered a user-blocking update that suspended.' + '\n\n' ,
1994
- { withoutStack : true } ,
1995
- ) ;
1980
+ // TODO: assert toErrorDev() when the warning is implemented again.
1981
+ ReactNoop . act ( ( ) => {
1982
+ Scheduler . unstable_runWithPriority (
1983
+ Scheduler . unstable_UserBlockingPriority ,
1984
+ ( ) => _setShow ( true ) ,
1985
+ ) ;
1986
+ } ) ;
1996
1987
} ,
1997
1988
) ;
1998
1989
0 commit comments