Skip to content

Commit

Permalink
Add gates to devtools tests using legacy mode
Browse files Browse the repository at this point in the history
  • Loading branch information
gnoff committed Mar 4, 2024
1 parent 9770f8d commit d0e460d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/react-devtools-shared/src/__tests__/store-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ describe('Store', () => {

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

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

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

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

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

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

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ describe('StoreStress (Legacy Mode)', () => {
// It renders different trees that should produce the same output.
// @reactVersion >= 16.9
// @reactVersion < 19
// @gate !disableLegacyMode
it('should handle a stress test with different tree operations (Legacy Mode)', () => {
let setShowX;
const A = () => 'a';
Expand Down

0 comments on commit d0e460d

Please sign in to comment.