Skip to content

Commit 0e8dd54

Browse files
committed
Fix tests
1 parent 9f02826 commit 0e8dd54

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

packages/react-art/src/__tests__/ReactART-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ describe('ReactART', () => {
364364
expect(onClick2).toBeCalled();
365365
});
366366

367-
// @gate !forceConcurrentByDefaultForTesting
367+
// @gate forceConcurrentByDefaultForTesting
368368
it('can concurrently render with a "primary" renderer while sharing context', async () => {
369369
const CurrentRendererContext = React.createContext(null);
370370

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,14 +1594,6 @@ describe('ReactHooksWithNoopRenderer', () => {
15941594
await waitFor(['Schedule update [0]', 'Count: 0']);
15951595

15961596
if (gate(flags => flags.forceConcurrentByDefaultForTesting)) {
1597-
expect(ReactNoop).toMatchRenderedOutput(<span prop="Count: 0" />);
1598-
await waitFor([
1599-
'Count: 0',
1600-
'Sync effect',
1601-
'Schedule update [1]',
1602-
'Count: 1',
1603-
]);
1604-
} else {
16051597
expect(ReactNoop).toMatchRenderedOutput(
16061598
<span prop="Count: (empty)" />,
16071599
);
@@ -1611,6 +1603,14 @@ describe('ReactHooksWithNoopRenderer', () => {
16111603
ReactNoop.flushPassiveEffects();
16121604
assertLog(['Schedule update [1]']);
16131605
await waitForAll(['Count: 1']);
1606+
} else {
1607+
expect(ReactNoop).toMatchRenderedOutput(<span prop="Count: 0" />);
1608+
await waitFor([
1609+
'Count: 0',
1610+
'Sync effect',
1611+
'Schedule update [1]',
1612+
'Count: 1',
1613+
]);
16141614
}
16151615

16161616
expect(ReactNoop).toMatchRenderedOutput(<span prop="Count: 1" />);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ describe('ReactInterleavedUpdates', () => {
8686
expect(root).toMatchRenderedOutput('222');
8787
});
8888

89-
// @gate !forceConcurrentByDefaultForTesting
89+
// @gate forceConcurrentByDefaultForTesting
9090
test('low priority update during an interleaved event is not processed during the current render', async () => {
9191
// Same as previous test, but the interleaved update is lower priority than
9292
// the in-progress render.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ describe('ReactSuspense', () => {
327327
expect(root).toMatchRenderedOutput('AB');
328328
});
329329

330-
// @gate !forceConcurrentByDefaultForTesting
330+
// @gate forceConcurrentByDefaultForTesting
331331
it(
332332
'interrupts current render when something suspends with a ' +
333333
"delay and we've already skipped over a lower priority update in " +

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3501,7 +3501,7 @@ describe('ReactSuspenseWithNoopRenderer', () => {
35013501
});
35023502

35033503
// @gate enableLegacyCache
3504-
// @gate !forceConcurrentByDefaultForTesting
3504+
// @gate forceConcurrentByDefaultForTesting
35053505
it('regression: ping at high priority causes update to be dropped', async () => {
35063506
const {useState, useTransition} = React;
35073507

0 commit comments

Comments
 (0)