@@ -72,33 +72,6 @@ describe('ReactTestUtils.act()', () => {
72
72
73
73
runActTests ( 'legacy mode' , renderLegacy , unmountLegacy , rerenderLegacy ) ;
74
74
75
- // and then in blocking mode
76
- if ( __EXPERIMENTAL__ ) {
77
- let blockingRoot = null ;
78
- const renderBatched = ( el , dom ) => {
79
- blockingRoot = ReactDOM . unstable_createBlockingRoot ( dom ) ;
80
- blockingRoot . render ( el ) ;
81
- } ;
82
-
83
- const unmountBatched = dom => {
84
- if ( blockingRoot !== null ) {
85
- blockingRoot . unmount ( ) ;
86
- blockingRoot = null ;
87
- }
88
- } ;
89
-
90
- const rerenderBatched = el => {
91
- blockingRoot . render ( el ) ;
92
- } ;
93
-
94
- runActTests (
95
- 'blocking mode' ,
96
- renderBatched ,
97
- unmountBatched ,
98
- rerenderBatched ,
99
- ) ;
100
- }
101
-
102
75
describe ( 'unacted effects' , ( ) => {
103
76
function App ( ) {
104
77
React . useEffect ( ( ) => { } , [ ] ) ;
@@ -124,19 +97,6 @@ describe('ReactTestUtils.act()', () => {
124
97
] ) ;
125
98
} ) ;
126
99
127
- // @gate experimental
128
- it ( 'warns in blocking mode' , ( ) => {
129
- expect ( ( ) => {
130
- const root = ReactDOM . unstable_createBlockingRoot (
131
- document . createElement ( 'div' ) ,
132
- ) ;
133
- root . render ( < App /> ) ;
134
- Scheduler . unstable_flushAll ( ) ;
135
- } ) . toErrorDev ( [
136
- 'An update to App ran an effect, but was not wrapped in act(...)' ,
137
- ] ) ;
138
- } ) ;
139
-
140
100
// @gate experimental
141
101
it ( 'warns in concurrent mode' , ( ) => {
142
102
expect ( ( ) => {
@@ -731,14 +691,10 @@ function runActTests(label, render, unmount, rerender) {
731
691
732
692
it ( 'triggers fallbacks if available' , async ( ) => {
733
693
if ( label !== 'legacy mode' ) {
734
- // FIXME: Support for Blocking* and Concurrent Mode were
735
- // intentionally removed from the public version of `act`. It will
736
- // be added back in a future major version, before Blocking and and
737
- // Concurrent Mode are officially released. Consider disabling all
738
- // non-Legacy tests in this suite until then.
739
- //
740
- // *Blocking Mode actually does happen to work, though
741
- // not "officially" since it's an unreleased feature.
694
+ // FIXME: Support for Concurrent Root intentionally removed
695
+ // from the public version of `act`. It will be added back in
696
+ // a future major version, before the Concurrent Root is released.
697
+ // Consider skipping all non-Legacy tests in this suite until then.
742
698
return ;
743
699
}
744
700
@@ -794,10 +750,8 @@ function runActTests(label, render, unmount, rerender) {
794
750
// In Concurrent Mode, refresh transitions delay indefinitely.
795
751
expect ( document . querySelector ( '[data-test-id=spinner]' ) ) . toBeNull ( ) ;
796
752
} else {
797
- // In Legacy Mode and Blocking Mode, all fallbacks are forced to
798
- // display, even during a refresh transition.
799
- // TODO: Consider delaying indefinitely in Blocking Mode, to match
800
- // Concurrent Mode semantics.
753
+ // In Legacy Mode, all fallbacks are forced to display,
754
+ // even during a refresh transition.
801
755
expect (
802
756
document . querySelector ( '[data-test-id=spinner]' ) ,
803
757
) . not . toBeNull ( ) ;
0 commit comments