Skip to content

Commit cd91f70

Browse files
committed
Add gates to devtools tests using legacy mode
1 parent 39eeab9 commit cd91f70

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

packages/react-devtools-shared/src/__tests__/store-test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ describe('Store', () => {
227227

228228
// @reactVersion >= 18.0
229229
// @reactVersion < 19
230+
// @gate !disableLegacyMode
230231
it('should support mount and update operations for multiple roots (legacy render)', () => {
231232
const Parent = ({count}) =>
232233
new Array(count).fill(true).map((_, index) => <Child key={index} />);
@@ -941,6 +942,7 @@ describe('Store', () => {
941942

942943
// @reactVersion >= 18.0
943944
// @reactVersion < 19
945+
// @gate !disableLegacyMode
944946
it('should support mount and update operations for multiple roots (legacy render)', () => {
945947
const Parent = ({count}) =>
946948
new Array(count).fill(true).map((_, index) => <Child key={index} />);
@@ -1469,6 +1471,7 @@ describe('Store', () => {
14691471

14701472
// @reactVersion >= 18.0
14711473
// @reactVersion < 19
1474+
// @gate !disableLegacyMode
14721475
it('detects and updates profiling support based on the attached roots (legacy render)', () => {
14731476
const Component = () => null;
14741477

@@ -1632,6 +1635,7 @@ describe('Store', () => {
16321635

16331636
// @reactVersion >= 18.0
16341637
// @reactVersion < 19
1638+
// @gate !disableLegacyMode
16351639
it('should support Lazy components (legacy render)', async () => {
16361640
const container = document.createElement('div');
16371641

@@ -1702,6 +1706,7 @@ describe('Store', () => {
17021706

17031707
// @reactVersion >= 18.0
17041708
// @reactVersion < 19
1709+
// @gate !disableLegacyMode
17051710
it('should support Lazy components that are unmounted before they finish loading (legacy render)', async () => {
17061711
const container = document.createElement('div');
17071712

packages/react-devtools-shared/src/__tests__/storeStressSync-test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ describe('StoreStress (Legacy Mode)', () => {
3636
// It renders different trees that should produce the same output.
3737
// @reactVersion >= 16.9
3838
// @reactVersion < 19
39+
// @gate !disableLegacyMode
3940
it('should handle a stress test with different tree operations (Legacy Mode)', () => {
4041
let setShowX;
4142
const A = () => 'a';

0 commit comments

Comments
 (0)