@@ -2418,18 +2418,8 @@ describe('ReactDOMServerPartialHydration', () => {
2418
2418
await promise ;
2419
2419
} ) ;
2420
2420
2421
- if (
2422
- gate (
2423
- flags =>
2424
- flags . enableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay ,
2425
- )
2426
- ) {
2427
- expect ( clicks ) . toBe ( 0 ) ;
2428
- expect ( container . textContent ) . toBe ( 'Click meHello' ) ;
2429
- } else {
2430
- expect ( clicks ) . toBe ( 1 ) ;
2431
- expect ( container . textContent ) . toBe ( 'Hello' ) ;
2432
- }
2421
+ expect ( clicks ) . toBe ( 0 ) ;
2422
+ expect ( container . textContent ) . toBe ( 'Click meHello' ) ;
2433
2423
document . body . removeChild ( container ) ;
2434
2424
} ) ;
2435
2425
@@ -2511,17 +2501,7 @@ describe('ReactDOMServerPartialHydration', () => {
2511
2501
await promise ;
2512
2502
} ) ;
2513
2503
2514
- if (
2515
- gate (
2516
- flags =>
2517
- flags . enableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay ,
2518
- )
2519
- ) {
2520
- expect ( onEvent ) . toHaveBeenCalledTimes ( 0 ) ;
2521
- } else {
2522
- expect ( onEvent ) . toHaveBeenCalledTimes ( 2 ) ;
2523
- }
2524
-
2504
+ expect ( onEvent ) . toHaveBeenCalledTimes ( 0 ) ;
2525
2505
document . body . removeChild ( container ) ;
2526
2506
} ) ;
2527
2507
@@ -2601,16 +2581,7 @@ describe('ReactDOMServerPartialHydration', () => {
2601
2581
await promise ;
2602
2582
} ) ;
2603
2583
2604
- if (
2605
- gate (
2606
- flags =>
2607
- flags . enableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay ,
2608
- )
2609
- ) {
2610
- expect ( clicks ) . toBe ( 0 ) ;
2611
- } else {
2612
- expect ( clicks ) . toBe ( 2 ) ;
2613
- }
2584
+ expect ( clicks ) . toBe ( 0 ) ;
2614
2585
2615
2586
document . body . removeChild ( container ) ;
2616
2587
} ) ;
@@ -2695,17 +2666,7 @@ describe('ReactDOMServerPartialHydration', () => {
2695
2666
resolve ( ) ;
2696
2667
await promise ;
2697
2668
} ) ;
2698
- if (
2699
- gate (
2700
- flags =>
2701
- flags . enableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay ,
2702
- )
2703
- ) {
2704
- expect ( onEvent ) . toHaveBeenCalledTimes ( 0 ) ;
2705
- } else {
2706
- expect ( onEvent ) . toHaveBeenCalledTimes ( 2 ) ;
2707
- }
2708
-
2669
+ expect ( onEvent ) . toHaveBeenCalledTimes ( 0 ) ;
2709
2670
document . body . removeChild ( container ) ;
2710
2671
} ) ;
2711
2672
@@ -2776,19 +2737,8 @@ describe('ReactDOMServerPartialHydration', () => {
2776
2737
await promise ;
2777
2738
} ) ;
2778
2739
2779
- if (
2780
- gate (
2781
- flags =>
2782
- flags . enableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay ,
2783
- )
2784
- ) {
2785
- expect ( clicksOnChild ) . toBe ( 0 ) ;
2786
- expect ( clicksOnParent ) . toBe ( 0 ) ;
2787
- } else {
2788
- expect ( clicksOnChild ) . toBe ( 1 ) ;
2789
- // This will be zero due to the stopPropagation.
2790
- expect ( clicksOnParent ) . toBe ( 0 ) ;
2791
- }
2740
+ expect ( clicksOnChild ) . toBe ( 0 ) ;
2741
+ expect ( clicksOnParent ) . toBe ( 0 ) ;
2792
2742
2793
2743
document . body . removeChild ( container ) ;
2794
2744
} ) ;
@@ -2864,16 +2814,7 @@ describe('ReactDOMServerPartialHydration', () => {
2864
2814
} ) ;
2865
2815
2866
2816
// We're now full hydrated.
2867
- if (
2868
- gate (
2869
- flags =>
2870
- flags . enableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay ,
2871
- )
2872
- ) {
2873
- expect ( clicks ) . toBe ( 0 ) ;
2874
- } else {
2875
- expect ( clicks ) . toBe ( 1 ) ;
2876
- }
2817
+ expect ( clicks ) . toBe ( 0 ) ;
2877
2818
2878
2819
document . body . removeChild ( parentContainer ) ;
2879
2820
} ) ;
@@ -3142,19 +3083,9 @@ describe('ReactDOMServerPartialHydration', () => {
3142
3083
await promise ;
3143
3084
} ) ;
3144
3085
3145
- if (
3146
- gate (
3147
- flags =>
3148
- flags . enableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay ,
3149
- )
3150
- ) {
3151
- // discrete event not replayed
3152
- expect ( submits ) . toBe ( 0 ) ;
3153
- expect ( container . textContent ) . toBe ( 'Click meHello' ) ;
3154
- } else {
3155
- expect ( submits ) . toBe ( 1 ) ;
3156
- expect ( container . textContent ) . toBe ( 'Hello' ) ;
3157
- }
3086
+ // discrete event not replayed
3087
+ expect ( submits ) . toBe ( 0 ) ;
3088
+ expect ( container . textContent ) . toBe ( 'Click meHello' ) ;
3158
3089
3159
3090
document . body . removeChild ( container ) ;
3160
3091
} ) ;
0 commit comments