@@ -669,7 +669,6 @@ describe('ReactDOMForm', () => {
669
669
expect ( actionCalled ) . toBe ( false ) ;
670
670
} ) ;
671
671
672
- // @gate enableAsyncActions
673
672
it ( 'form actions are transitions' , async ( ) => {
674
673
const formRef = React . createRef ( ) ;
675
674
@@ -707,7 +706,6 @@ describe('ReactDOMForm', () => {
707
706
expect ( container . textContent ) . toBe ( 'Updated' ) ;
708
707
} ) ;
709
708
710
- // @gate enableAsyncActions
711
709
it ( 'multiple form actions' , async ( ) => {
712
710
const formRef = React . createRef ( ) ;
713
711
@@ -798,12 +796,6 @@ describe('ReactDOMForm', () => {
798
796
} ) ;
799
797
800
798
it ( 'sync errors in form actions can be captured by an error boundary' , async ( ) => {
801
- if ( gate ( flags => ! flags . enableAsyncActions ) ) {
802
- // TODO: Uncaught JSDOM errors fail the test after the scope has finished
803
- // so don't work with the `gate` mechanism.
804
- return ;
805
- }
806
-
807
799
class ErrorBoundary extends React . Component {
808
800
state = { error : null } ;
809
801
static getDerivedStateFromError ( error ) {
@@ -844,12 +836,6 @@ describe('ReactDOMForm', () => {
844
836
} ) ;
845
837
846
838
it ( 'async errors in form actions can be captured by an error boundary' , async ( ) => {
847
- if ( gate ( flags => ! flags . enableAsyncActions ) ) {
848
- // TODO: Uncaught JSDOM errors fail the test after the scope has finished
849
- // so don't work with the `gate` mechanism.
850
- return ;
851
- }
852
-
853
839
class ErrorBoundary extends React . Component {
854
840
state = { error : null } ;
855
841
static getDerivedStateFromError ( error ) {
@@ -895,7 +881,6 @@ describe('ReactDOMForm', () => {
895
881
expect ( container . textContent ) . toBe ( 'Oh no!' ) ;
896
882
} ) ;
897
883
898
- // @gate enableAsyncActions
899
884
it ( 'useFormStatus reads the status of a pending form action' , async ( ) => {
900
885
const formRef = React . createRef ( ) ;
901
886
@@ -992,7 +977,6 @@ describe('ReactDOMForm', () => {
992
977
) ;
993
978
} ) ;
994
979
995
- // @gate enableAsyncActions
996
980
it ( 'useActionState updates state asynchronously and queues multiple actions' , async ( ) => {
997
981
let actionCounter = 0 ;
998
982
async function action ( state , type ) {
@@ -1052,7 +1036,6 @@ describe('ReactDOMForm', () => {
1052
1036
expect ( container . textContent ) . toBe ( '2' ) ;
1053
1037
} ) ;
1054
1038
1055
- // @gate enableAsyncActions
1056
1039
it ( 'useActionState supports inline actions' , async ( ) => {
1057
1040
let increment ;
1058
1041
function App ( { stepSize} ) {
@@ -1084,7 +1067,6 @@ describe('ReactDOMForm', () => {
1084
1067
assertLog ( [ 'Pending 1' , '11' ] ) ;
1085
1068
} ) ;
1086
1069
1087
- // @gate enableAsyncActions
1088
1070
it ( 'useActionState: dispatch throws if called during render' , async ( ) => {
1089
1071
function App ( ) {
1090
1072
const [ state , dispatch , isPending ] = useActionState ( async ( ) => { } , 0 ) ;
@@ -1100,7 +1082,6 @@ describe('ReactDOMForm', () => {
1100
1082
} ) ;
1101
1083
} ) ;
1102
1084
1103
- // @gate enableAsyncActions
1104
1085
it ( 'useActionState: queues multiple actions and runs them in order' , async ( ) => {
1105
1086
let action ;
1106
1087
function App ( ) {
@@ -1132,7 +1113,6 @@ describe('ReactDOMForm', () => {
1132
1113
expect ( container . textContent ) . toBe ( 'D' ) ;
1133
1114
} ) ;
1134
1115
1135
- // @gate enableAsyncActions
1136
1116
it (
1137
1117
'useActionState: when calling a queued action, uses the implementation ' +
1138
1118
'that was current at the time it was dispatched, not the most recent one' ,
@@ -1179,7 +1159,6 @@ describe('ReactDOMForm', () => {
1179
1159
} ,
1180
1160
) ;
1181
1161
1182
- // @gate enableAsyncActions
1183
1162
it ( 'useActionState: works if action is sync' , async ( ) => {
1184
1163
let increment ;
1185
1164
function App ( { stepSize} ) {
@@ -1211,7 +1190,6 @@ describe('ReactDOMForm', () => {
1211
1190
assertLog ( [ 'Pending 1' , '11' ] ) ;
1212
1191
} ) ;
1213
1192
1214
- // @gate enableAsyncActions
1215
1193
it ( 'useActionState: can mix sync and async actions' , async ( ) => {
1216
1194
let action ;
1217
1195
function App ( ) {
@@ -1239,7 +1217,6 @@ describe('ReactDOMForm', () => {
1239
1217
expect ( container . textContent ) . toBe ( 'E' ) ;
1240
1218
} ) ;
1241
1219
1242
- // @gate enableAsyncActions
1243
1220
it ( 'useActionState: error handling (sync action)' , async ( ) => {
1244
1221
class ErrorBoundary extends React . Component {
1245
1222
state = { error : null } ;
@@ -1288,7 +1265,6 @@ describe('ReactDOMForm', () => {
1288
1265
expect ( container . textContent ) . toBe ( 'Caught an error: Oops!' ) ;
1289
1266
} ) ;
1290
1267
1291
- // @gate enableAsyncActions
1292
1268
it ( 'useActionState: error handling (async action)' , async ( ) => {
1293
1269
class ErrorBoundary extends React . Component {
1294
1270
state = { error : null } ;
@@ -1394,7 +1370,6 @@ describe('ReactDOMForm', () => {
1394
1370
expect ( container . textContent ) . toBe ( 'Caught an error: Oops!' ) ;
1395
1371
} ) ;
1396
1372
1397
- // @gate enableAsyncActions
1398
1373
it ( 'useActionState works in StrictMode' , async ( ) => {
1399
1374
let actionCounter = 0 ;
1400
1375
async function action ( state , type ) {
0 commit comments