@@ -1917,7 +1917,6 @@ describe('ReactIncremental', () => {
1917
1917
'The old API will be supported in all 16.x releases, but applications ' +
1918
1918
'using it should migrate to the new version.\n\n' +
1919
1919
'Please update the following components: Intl, ShowBoth, ShowLocale' ,
1920
- { withoutStack : true } ,
1921
1920
) ;
1922
1921
1923
1922
ReactNoop . render (
@@ -1974,7 +1973,6 @@ describe('ReactIncremental', () => {
1974
1973
'The old API will be supported in all 16.x releases, but applications ' +
1975
1974
'using it should migrate to the new version.\n\n' +
1976
1975
'Please update the following components: Router, ShowRoute' ,
1977
- { withoutStack : true } ,
1978
1976
) ;
1979
1977
} ) ;
1980
1978
@@ -2000,14 +1998,11 @@ describe('ReactIncremental', () => {
2000
1998
}
2001
1999
2002
2000
ReactNoop . render ( < Recurse /> ) ;
2003
- expect ( ( ) =>
2004
- expect ( Scheduler ) . toFlushWithoutYielding ( ) ,
2005
- ) . toErrorDev (
2001
+ expect ( ( ) => expect ( Scheduler ) . toFlushWithoutYielding ( ) ) . toErrorDev (
2006
2002
'Legacy context API has been detected within a strict-mode tree.\n\n' +
2007
2003
'The old API will be supported in all 16.x releases, but applications ' +
2008
2004
'using it should migrate to the new version.\n\n' +
2009
2005
'Please update the following components: Recurse' ,
2010
- { withoutStack : true } ,
2011
2006
) ;
2012
2007
expect ( ops ) . toEqual ( [
2013
2008
'Recurse {}' ,
@@ -2041,20 +2036,17 @@ describe('ReactIncremental', () => {
2041
2036
} ;
2042
2037
2043
2038
ReactNoop . render ( < Recurse /> ) ;
2044
- expect ( ( ) => expect ( Scheduler ) . toFlushWithoutYielding ( ) ) . toErrorDev (
2045
- [
2046
- 'Warning: The <Recurse /> component appears to be a function component that returns a class instance. ' +
2047
- 'Change Recurse to a class that extends React.Component instead. ' +
2048
- "If you can't use a class try assigning the prototype on the function as a workaround. " +
2049
- '`Recurse.prototype = React.Component.prototype`. ' +
2050
- "Don't use an arrow function since it cannot be called with `new` by React." ,
2051
- 'Legacy context API has been detected within a strict-mode tree.\n\n' +
2052
- 'The old API will be supported in all 16.x releases, but applications ' +
2053
- 'using it should migrate to the new version.\n\n' +
2054
- 'Please update the following components: Recurse' ,
2055
- ] ,
2056
- { withoutStack : 1 } ,
2057
- ) ;
2039
+ expect ( ( ) => expect ( Scheduler ) . toFlushWithoutYielding ( ) ) . toErrorDev ( [
2040
+ 'Warning: The <Recurse /> component appears to be a function component that returns a class instance. ' +
2041
+ 'Change Recurse to a class that extends React.Component instead. ' +
2042
+ "If you can't use a class try assigning the prototype on the function as a workaround. " +
2043
+ '`Recurse.prototype = React.Component.prototype`. ' +
2044
+ "Don't use an arrow function since it cannot be called with `new` by React." ,
2045
+ 'Legacy context API has been detected within a strict-mode tree.\n\n' +
2046
+ 'The old API will be supported in all 16.x releases, but applications ' +
2047
+ 'using it should migrate to the new version.\n\n' +
2048
+ 'Please update the following components: Recurse' ,
2049
+ ] ) ;
2058
2050
expect ( ops ) . toEqual ( [
2059
2051
'Recurse {}' ,
2060
2052
'Recurse {"n":2}' ,
@@ -2120,7 +2112,6 @@ describe('ReactIncremental', () => {
2120
2112
'The old API will be supported in all 16.x releases, but applications ' +
2121
2113
'using it should migrate to the new version.\n\n' +
2122
2114
'Please update the following components: Intl, ShowLocale' ,
2123
- { withoutStack : true } ,
2124
2115
) ;
2125
2116
} ) ;
2126
2117
@@ -2196,14 +2187,11 @@ describe('ReactIncremental', () => {
2196
2187
</ IndirectionFn >
2197
2188
</ Intl > ,
2198
2189
) ;
2199
- expect ( ( ) =>
2200
- expect ( Scheduler ) . toFlushWithoutYielding ( ) ,
2201
- ) . toErrorDev (
2190
+ expect ( ( ) => expect ( Scheduler ) . toFlushWithoutYielding ( ) ) . toErrorDev (
2202
2191
'Legacy context API has been detected within a strict-mode tree.\n\n' +
2203
2192
'The old API will be supported in all 16.x releases, but applications ' +
2204
2193
'using it should migrate to the new version.\n\n' +
2205
2194
'Please update the following components: Intl, ShowLocaleClass, ShowLocaleFn' ,
2206
- { withoutStack : true } ,
2207
2195
) ;
2208
2196
expect ( ops ) . toEqual ( [
2209
2197
'Intl:read {}' ,
@@ -2292,14 +2280,11 @@ describe('ReactIncremental', () => {
2292
2280
</ IndirectionFn >
2293
2281
</ Stateful > ,
2294
2282
) ;
2295
- expect ( ( ) =>
2296
- expect ( Scheduler ) . toFlushWithoutYielding ( ) ,
2297
- ) . toErrorDev (
2283
+ expect ( ( ) => expect ( Scheduler ) . toFlushWithoutYielding ( ) ) . toErrorDev (
2298
2284
'Legacy context API has been detected within a strict-mode tree.\n\n' +
2299
2285
'The old API will be supported in all 16.x releases, but applications ' +
2300
2286
'using it should migrate to the new version.\n\n' +
2301
2287
'Please update the following components: Intl, ShowLocaleClass, ShowLocaleFn' ,
2302
- { withoutStack : true } ,
2303
2288
) ;
2304
2289
expect ( ops ) . toEqual ( [
2305
2290
'Intl:read {}' ,
@@ -2365,14 +2350,11 @@ describe('ReactIncremental', () => {
2365
2350
2366
2351
// Init
2367
2352
ReactNoop . render ( < Root /> ) ;
2368
- expect ( ( ) =>
2369
- expect ( Scheduler ) . toFlushWithoutYielding ( ) ,
2370
- ) . toErrorDev (
2353
+ expect ( ( ) => expect ( Scheduler ) . toFlushWithoutYielding ( ) ) . toErrorDev (
2371
2354
'Legacy context API has been detected within a strict-mode tree.\n\n' +
2372
2355
'The old API will be supported in all 16.x releases, but applications ' +
2373
2356
'using it should migrate to the new version.\n\n' +
2374
2357
'Please update the following components: Child' ,
2375
- { withoutStack : true } ,
2376
2358
) ;
2377
2359
2378
2360
// Trigger an update in the middle of the tree
@@ -2419,14 +2401,11 @@ describe('ReactIncremental', () => {
2419
2401
2420
2402
// Init
2421
2403
ReactNoop . render ( < Root /> ) ;
2422
- expect ( ( ) =>
2423
- expect ( Scheduler ) . toFlushWithoutYielding ( ) ,
2424
- ) . toErrorDev (
2404
+ expect ( ( ) => expect ( Scheduler ) . toFlushWithoutYielding ( ) ) . toErrorDev (
2425
2405
'Legacy context API has been detected within a strict-mode tree.\n\n' +
2426
2406
'The old API will be supported in all 16.x releases, but applications ' +
2427
2407
'using it should migrate to the new version.\n\n' +
2428
2408
'Please update the following components: ContextProvider' ,
2429
- { withoutStack : true } ,
2430
2409
) ;
2431
2410
2432
2411
// Trigger an update in the middle of the tree
@@ -2479,7 +2458,7 @@ describe('ReactIncremental', () => {
2479
2458
'using it should migrate to the new version.\n\n' +
2480
2459
'Please update the following components: MyComponent' ,
2481
2460
] ,
2482
- { withoutStack : true } ,
2461
+ { withoutStack : 1 } ,
2483
2462
) ;
2484
2463
2485
2464
expect ( ops ) . toEqual ( [
@@ -2622,14 +2601,11 @@ describe('ReactIncremental', () => {
2622
2601
</ TopContextProvider > ,
2623
2602
) ;
2624
2603
2625
- expect ( ( ) =>
2626
- expect ( Scheduler ) . toFlushWithoutYielding ( ) ,
2627
- ) . toErrorDev (
2604
+ expect ( ( ) => expect ( Scheduler ) . toFlushWithoutYielding ( ) ) . toErrorDev (
2628
2605
'Legacy context API has been detected within a strict-mode tree.\n\n' +
2629
2606
'The old API will be supported in all 16.x releases, but applications ' +
2630
2607
'using it should migrate to the new version.\n\n' +
2631
2608
'Please update the following components: Child, TopContextProvider' ,
2632
- { withoutStack : true } ,
2633
2609
) ;
2634
2610
expect ( rendered ) . toEqual ( [ 'count:0' ] ) ;
2635
2611
instance . updateCount ( ) ;
@@ -2688,14 +2664,11 @@ describe('ReactIncremental', () => {
2688
2664
</ TopContextProvider > ,
2689
2665
) ;
2690
2666
2691
- expect ( ( ) =>
2692
- expect ( Scheduler ) . toFlushWithoutYielding ( ) ,
2693
- ) . toErrorDev (
2667
+ expect ( ( ) => expect ( Scheduler ) . toFlushWithoutYielding ( ) ) . toErrorDev (
2694
2668
'Legacy context API has been detected within a strict-mode tree.\n\n' +
2695
2669
'The old API will be supported in all 16.x releases, but applications ' +
2696
2670
'using it should migrate to the new version.\n\n' +
2697
2671
'Please update the following components: Child, MiddleContextProvider, TopContextProvider' ,
2698
- { withoutStack : true } ,
2699
2672
) ;
2700
2673
expect ( rendered ) . toEqual ( [ 'count:0' ] ) ;
2701
2674
instance . updateCount ( ) ;
@@ -2763,14 +2736,11 @@ describe('ReactIncremental', () => {
2763
2736
</ TopContextProvider > ,
2764
2737
) ;
2765
2738
2766
- expect ( ( ) =>
2767
- expect ( Scheduler ) . toFlushWithoutYielding ( ) ,
2768
- ) . toErrorDev (
2739
+ expect ( ( ) => expect ( Scheduler ) . toFlushWithoutYielding ( ) ) . toErrorDev (
2769
2740
'Legacy context API has been detected within a strict-mode tree.\n\n' +
2770
2741
'The old API will be supported in all 16.x releases, but applications ' +
2771
2742
'using it should migrate to the new version.\n\n' +
2772
2743
'Please update the following components: Child, MiddleContextProvider, TopContextProvider' ,
2773
- { withoutStack : true } ,
2774
2744
) ;
2775
2745
expect ( rendered ) . toEqual ( [ 'count:0' ] ) ;
2776
2746
instance . updateCount ( ) ;
@@ -2848,14 +2818,11 @@ describe('ReactIncremental', () => {
2848
2818
</ TopContextProvider > ,
2849
2819
) ;
2850
2820
2851
- expect ( ( ) =>
2852
- expect ( Scheduler ) . toFlushWithoutYielding ( ) ,
2853
- ) . toErrorDev (
2821
+ expect ( ( ) => expect ( Scheduler ) . toFlushWithoutYielding ( ) ) . toErrorDev (
2854
2822
'Legacy context API has been detected within a strict-mode tree.\n\n' +
2855
2823
'The old API will be supported in all 16.x releases, but applications ' +
2856
2824
'using it should migrate to the new version.\n\n' +
2857
2825
'Please update the following components: Child, MiddleContextProvider, TopContextProvider' ,
2858
- { withoutStack : true } ,
2859
2826
) ;
2860
2827
expect ( rendered ) . toEqual ( [ 'count:0, name:brian' ] ) ;
2861
2828
topInstance . updateCount ( ) ;
@@ -2956,10 +2923,9 @@ describe('ReactIncremental', () => {
2956
2923
ReactNoop . render ( < Boundary /> ) ;
2957
2924
expect ( ( ) => {
2958
2925
expect ( Scheduler ) . toFlushWithoutYielding ( ) ;
2959
- } ) . toErrorDev (
2960
- [ 'Legacy context API has been detected within a strict-mode tree' ] ,
2961
- { withoutStack : true } ,
2962
- ) ;
2926
+ } ) . toErrorDev ( [
2927
+ 'Legacy context API has been detected within a strict-mode tree' ,
2928
+ ] ) ;
2963
2929
}
2964
2930
2965
2931
// First, verify that this code path normally receives Fibers as keys,
0 commit comments