Skip to content

Commit 7bf78f3

Browse files
committed
Gate tests
1 parent 1aaa31b commit 7bf78f3

11 files changed

+113
-114
lines changed

packages/react-dom/src/__tests__/ReactDOMServerPartialHydration-test.internal.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3197,7 +3197,7 @@ describe('ReactDOMServerPartialHydration', () => {
31973197
expect(span.innerHTML).toBe('Hidden child');
31983198
});
31993199

3200-
// @gate experimental || www
3200+
// @gate www
32013201
it('renders a hidden LegacyHidden component inside a Suspense boundary', async () => {
32023202
const ref = React.createRef();
32033203

@@ -3225,7 +3225,7 @@ describe('ReactDOMServerPartialHydration', () => {
32253225
expect(span.innerHTML).toBe('Hidden child');
32263226
});
32273227

3228-
// @gate experimental || www
3228+
// @gate www
32293229
it('renders a visible LegacyHidden component', async () => {
32303230
const ref = React.createRef();
32313231

packages/react-dom/src/__tests__/ReactUpdates-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1302,7 +1302,7 @@ describe('ReactUpdates', () => {
13021302
expect(ops).toEqual(['Foo', 'Bar', 'Baz']);
13031303
});
13041304

1305-
// @gate experimental || www
1305+
// @gate www
13061306
it('delays sync updates inside hidden subtrees in Concurrent Mode', () => {
13071307
const container = document.createElement('div');
13081308

packages/react-reconciler/src/__tests__/ReactContextPropagation-test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ describe('ReactLazyContextPropagation', () => {
546546
expect(root).toMatchRenderedOutput('BB');
547547
});
548548

549-
// @gate experimental || www
549+
// @gate www
550550
test('context is propagated through offscreen trees', async () => {
551551
const LegacyHidden = React.unstable_LegacyHidden;
552552

@@ -592,7 +592,7 @@ describe('ReactLazyContextPropagation', () => {
592592
expect(root).toMatchRenderedOutput('BB');
593593
});
594594

595-
// @gate experimental || www
595+
// @gate www
596596
test('multiple contexts are propagated across through offscreen trees', async () => {
597597
// Same as previous test, but with multiple context providers
598598
const LegacyHidden = React.unstable_LegacyHidden;
@@ -818,7 +818,7 @@ describe('ReactLazyContextPropagation', () => {
818818
expect(root).toMatchRenderedOutput('BB');
819819
});
820820

821-
// @gate experimental || www
821+
// @gate www
822822
test('nested bailouts through offscreen trees', async () => {
823823
// Lazy context propagation will stop propagating when it hits the first
824824
// match. If we bail out again inside that tree, we must resume propagating.

packages/react-reconciler/src/__tests__/ReactIncremental-test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ describe('ReactIncremental', () => {
270270
expect(inst.state).toEqual({text: 'bar', text2: 'baz'});
271271
});
272272

273-
// @gate experimental || www
273+
// @gate www
274274
it('can deprioritize unfinished work and resume it later', () => {
275275
function Bar(props) {
276276
Scheduler.unstable_yieldValue('Bar');
@@ -316,7 +316,7 @@ describe('ReactIncremental', () => {
316316
expect(Scheduler).toFlushAndYield(['Middle', 'Middle']);
317317
});
318318

319-
// @gate experimental || www
319+
// @gate www
320320
it('can deprioritize a tree from without dropping work', () => {
321321
function Bar(props) {
322322
Scheduler.unstable_yieldValue('Bar');
@@ -1999,7 +1999,7 @@ describe('ReactIncremental', () => {
19991999
});
20002000
}
20012001

2002-
// @gate experimental || www
2002+
// @gate www
20032003
it('provides context when reusing work', () => {
20042004
class Intl extends React.Component {
20052005
static childContextTypes = {

packages/react-reconciler/src/__tests__/ReactIncrementalErrorHandling-test.internal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ describe('ReactIncrementalErrorHandling', () => {
310310
expect(ReactNoop.getChildren()).toEqual([span('Everything is fine.')]);
311311
});
312312

313-
// @gate experimental || www
313+
// @gate www
314314
it('does not include offscreen work when retrying after an error', () => {
315315
function App(props) {
316316
if (props.isBroken) {

packages/react-reconciler/src/__tests__/ReactIncrementalSideEffects-test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ describe('ReactIncrementalSideEffects', () => {
424424
]);
425425
});
426426

427-
// @gate experimental || www
427+
// @gate www
428428
it('preserves a previously rendered node when deprioritized', () => {
429429
function Middle(props) {
430430
Scheduler.unstable_yieldValue('Middle');
@@ -475,7 +475,7 @@ describe('ReactIncrementalSideEffects', () => {
475475
);
476476
});
477477

478-
// @gate experimental || www
478+
// @gate www
479479
it('can reuse side-effects after being preempted', () => {
480480
function Bar(props) {
481481
Scheduler.unstable_yieldValue('Bar');
@@ -555,7 +555,7 @@ describe('ReactIncrementalSideEffects', () => {
555555
);
556556
});
557557

558-
// @gate experimental || www
558+
// @gate www
559559
it('can reuse side-effects after being preempted, if shouldComponentUpdate is false', () => {
560560
class Bar extends React.Component {
561561
shouldComponentUpdate(nextProps) {
@@ -690,7 +690,7 @@ describe('ReactIncrementalSideEffects', () => {
690690
expect(ReactNoop.getChildrenAsJSX()).toEqual(<span prop={3} />);
691691
});
692692

693-
// @gate experimental || www
693+
// @gate www
694694
it('updates a child even though the old props is empty', () => {
695695
function Foo(props) {
696696
return (
@@ -930,7 +930,7 @@ describe('ReactIncrementalSideEffects', () => {
930930
expect(ops).toEqual(['Bar', 'Baz', 'Bar', 'Bar']);
931931
});
932932

933-
// @gate experimental || www
933+
// @gate www
934934
it('deprioritizes setStates that happens within a deprioritized tree', () => {
935935
const barInstances = [];
936936

packages/react-reconciler/src/__tests__/ReactNewContext-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ describe('ReactNewContext', () => {
667667
expect(ReactNoop.getChildren()).toEqual([span(2), span(2)]);
668668
});
669669

670-
// @gate experimental || www
670+
// @gate www
671671
it("context consumer doesn't bail out inside hidden subtree", () => {
672672
const Context = React.createContext('dark');
673673
const Consumer = getConsumer(Context);

packages/react-reconciler/src/__tests__/ReactOffscreen-test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe('ReactOffscreen', () => {
2626
return <span prop={props.text} />;
2727
}
2828

29-
// @gate experimental || www
29+
// @gate www
3030
it('unstable-defer-without-hiding should never toggle the visibility of its children', async () => {
3131
function App({mode}) {
3232
return (
@@ -85,7 +85,7 @@ describe('ReactOffscreen', () => {
8585
);
8686
});
8787

88-
// @gate experimental || www
88+
// @gate www
8989
it('does not defer in legacy mode', async () => {
9090
let setState;
9191
function Foo() {
@@ -130,7 +130,7 @@ describe('ReactOffscreen', () => {
130130
);
131131
});
132132

133-
// @gate experimental || www
133+
// @gate www
134134
it('does defer in concurrent mode', async () => {
135135
let setState;
136136
function Foo() {
@@ -310,7 +310,7 @@ describe('ReactOffscreen', () => {
310310
expect(root).toMatchRenderedOutput(<span hidden={true} prop="Child" />);
311311
});
312312

313-
// @gate experimental || www
313+
// @gate www
314314
it('does not toggle effects for LegacyHidden component', async () => {
315315
// LegacyHidden is meant to be the same as offscreen except it doesn't
316316
// do anything to effects. Only used by www, as a temporary migration step.

packages/react-reconciler/src/__tests__/ReactSchedulerIntegration-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ describe('ReactSchedulerIntegration', () => {
122122
expect(Scheduler).toHaveYielded(['A', 'B', 'C']);
123123
});
124124

125-
// @gate experimental || www
125+
// @gate www
126126
it('idle updates are not blocked by offscreen work', async () => {
127127
function Text({text}) {
128128
Scheduler.unstable_yieldValue(text);

packages/react-reconciler/src/__tests__/ReactSuspenseWithNoopRenderer-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3073,7 +3073,7 @@ describe('ReactSuspenseWithNoopRenderer', () => {
30733073
expect(root).toMatchRenderedOutput(<span prop="Foo" />);
30743074
});
30753075

3076-
// @gate enableCache
3076+
// @gate enableCache && enableLegacyHidden
30773077
it('should not render hidden content while suspended on higher pri', async () => {
30783078
function Offscreen() {
30793079
Scheduler.unstable_yieldValue('Offscreen');
@@ -3123,7 +3123,7 @@ describe('ReactSuspenseWithNoopRenderer', () => {
31233123
);
31243124
});
31253125

3126-
// @gate enableCache
3126+
// @gate enableCache && enableLegacyHidden
31273127
it('should be able to unblock higher pri content before suspended hidden', async () => {
31283128
function Offscreen() {
31293129
Scheduler.unstable_yieldValue('Offscreen');

0 commit comments

Comments
 (0)