Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused ReactTestUtils from ReactDOMServerIntegration tests #28379

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const ReactFeatureFlags = require('shared/ReactFeatureFlags');
let React;
let ReactDOM;
let ReactDOMClient;
let ReactTestUtils;
let ReactDOMServer;

function initModules() {
Expand All @@ -26,13 +25,11 @@ function initModules() {
ReactDOM = require('react-dom');
ReactDOMClient = require('react-dom/client');
ReactDOMServer = require('react-dom/server');
ReactTestUtils = require('react-dom/test-utils');

// Make them available to the helpers.
return {
ReactDOMClient,
ReactDOMServer,
ReactTestUtils,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,18 @@ const TEXT_NODE_TYPE = 3;
let React;
let ReactDOMClient;
let ReactDOMServer;
let ReactTestUtils;

function initModules() {
// Reset warning cache.
jest.resetModules();
React = require('react');
ReactDOMClient = require('react-dom/client');
ReactDOMServer = require('react-dom/server');
ReactTestUtils = require('react-dom/test-utils');

// Make them available to the helpers.
return {
ReactDOMClient,
ReactDOMServer,
ReactTestUtils,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,18 @@ const {disableInputAttributeSyncing} = require('shared/ReactFeatureFlags');
let React;
let ReactDOMClient;
let ReactDOMServer;
let ReactTestUtils;

function initModules() {
// Reset warning cache.
jest.resetModules();
React = require('react');
ReactDOMClient = require('react-dom/client');
ReactDOMServer = require('react-dom/server');
ReactTestUtils = require('react-dom/test-utils');

// Make them available to the helpers.
return {
ReactDOMClient,
ReactDOMServer,
ReactTestUtils,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,18 @@ const ReactDOMServerIntegrationUtils = require('./utils/ReactDOMServerIntegratio
let React;
let ReactDOMClient;
let ReactDOMServer;
let ReactTestUtils;

function initModules() {
// Reset warning cache.
jest.resetModules();
React = require('react');
ReactDOMClient = require('react-dom/client');
ReactDOMServer = require('react-dom/server');
ReactTestUtils = require('react-dom/test-utils');

// Make them available to the helpers.
return {
ReactDOMClient,
ReactDOMServer,
ReactTestUtils,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ let ReactDOM;
let ReactDOMClient;
let ReactDOMServer;
let ReactFeatureFlags;
let ReactTestUtils;

function initModules() {
jest.resetModules();
Expand All @@ -28,13 +27,11 @@ function initModules() {
ReactDOMClient = require('react-dom/client');
ReactDOMServer = require('react-dom/server');
ReactFeatureFlags = require('shared/ReactFeatureFlags');
ReactTestUtils = require('react-dom/test-utils');

// Make them available to the helpers.
return {
ReactDOMClient,
ReactDOMServer,
ReactTestUtils,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,18 @@ const ReactDOMServerIntegrationUtils = require('./utils/ReactDOMServerIntegratio
let React;
let ReactDOMClient;
let ReactDOMServer;
let ReactTestUtils;

function initModules() {
// Reset warning cache.
jest.resetModules();
React = require('react');
ReactDOMClient = require('react-dom/client');
ReactDOMServer = require('react-dom/server');
ReactTestUtils = require('react-dom/test-utils');

// Make them available to the helpers.
return {
ReactDOMClient,
ReactDOMServer,
ReactTestUtils,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const ReactDOMServerIntegrationUtils = require('./utils/ReactDOMServerIntegratio
let React;
let ReactDOMClient;
let ReactDOMServer;
let ReactTestUtils;
let useState;
let useReducer;
let useEffect;
Expand All @@ -41,7 +40,6 @@ function initModules() {
React = require('react');
ReactDOMClient = require('react-dom/client');
ReactDOMServer = require('react-dom/server');
ReactTestUtils = require('react-dom/test-utils');
useState = React.useState;
useReducer = React.useReducer;
useEffect = React.useEffect;
Expand Down Expand Up @@ -69,7 +67,6 @@ function initModules() {
return {
ReactDOMClient,
ReactDOMServer,
ReactTestUtils,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,18 @@ const {disableInputAttributeSyncing} = require('shared/ReactFeatureFlags');
let React;
let ReactDOMClient;
let ReactDOMServer;
let ReactTestUtils;

function initModules() {
// Reset warning cache.
jest.resetModules();
React = require('react');
ReactDOMClient = require('react-dom/client');
ReactDOMServer = require('react-dom/server');
ReactTestUtils = require('react-dom/test-utils');

// Make them available to the helpers.
return {
ReactDOMClient,
ReactDOMServer,
ReactTestUtils,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ let PropTypes;
let React;
let ReactDOM;
let ReactDOMServer;
let ReactTestUtils;

function initModules() {
// Reset warning cache.
Expand All @@ -25,13 +24,11 @@ function initModules() {
React = require('react');
ReactDOM = require('react-dom');
ReactDOMServer = require('react-dom/server');
ReactTestUtils = require('react-dom/test-utils');

// Make them available to the helpers.
return {
ReactDOM,
ReactDOMServer,
ReactTestUtils,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@ let React;
let ReactDOM;
let ReactFeatureFlags;
let ReactDOMServer;
let ReactTestUtils;

function initModules() {
// Reset warning cache.
jest.resetModules();
React = require('react');
ReactDOM = require('react-dom');
ReactDOMServer = require('react-dom/server');
ReactTestUtils = require('react-dom/test-utils');

ReactFeatureFlags = require('shared/ReactFeatureFlags');
ReactFeatureFlags.disableLegacyContext = true;
Expand All @@ -33,7 +31,6 @@ function initModules() {
return {
ReactDOM,
ReactDOMServer,
ReactTestUtils,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,18 @@ const ReactDOMServerIntegrationUtils = require('./utils/ReactDOMServerIntegratio
let React;
let ReactDOMClient;
let ReactDOMServer;
let ReactTestUtils;

function initModules() {
// Reset warning cache.
jest.resetModules();
React = require('react');
ReactDOMClient = require('react-dom/client');
ReactDOMServer = require('react-dom/server');
ReactTestUtils = require('react-dom/test-utils');

// Make them available to the helpers.
return {
ReactDOMClient,
ReactDOMServer,
ReactTestUtils,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,18 @@ const ReactDOMServerIntegrationUtils = require('./utils/ReactDOMServerIntegratio
let React;
let ReactDOMClient;
let ReactDOMServer;
let ReactTestUtils;

function initModules() {
// Reset warning cache.
jest.resetModules();
React = require('react');
ReactDOMClient = require('react-dom/client');
ReactDOMServer = require('react-dom/server');
ReactTestUtils = require('react-dom/test-utils');

// Make them available to the helpers.
return {
ReactDOMClient,
ReactDOMServer,
ReactTestUtils,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ let React;
let ReactDOM;
let ReactDOMClient;
let ReactDOMServer;
let ReactTestUtils;

describe('ReactDOMServerIntegration', () => {
function initModules() {
Expand All @@ -25,13 +24,11 @@ describe('ReactDOMServerIntegration', () => {
React = require('react');
ReactDOMClient = require('react-dom/client');
ReactDOMServer = require('react-dom/server');
ReactTestUtils = require('react-dom/test-utils');

// Make them available to the helpers.
return {
ReactDOMClient,
ReactDOMServer,
ReactTestUtils,
};
}

Expand Down Expand Up @@ -465,13 +462,11 @@ describe('ReactDOMServerIntegration (legacy)', () => {
React = require('react');
ReactDOM = require('react-dom');
ReactDOMServer = require('react-dom/server');
ReactTestUtils = require('react-dom/test-utils');

// Make them available to the helpers.
return {
ReactDOM,
ReactDOMServer,
ReactTestUtils,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,18 @@ const ReactDOMServerIntegrationUtils = require('./utils/ReactDOMServerIntegratio
let React;
let ReactDOMClient;
let ReactDOMServer;
let ReactTestUtils;

function initModules() {
// Reset warning cache.
jest.resetModules();
React = require('react');
ReactDOMClient = require('react-dom/client');
ReactDOMServer = require('react-dom/server');
ReactTestUtils = require('react-dom/test-utils');

// Make them available to the helpers.
return {
ReactDOMClient,
ReactDOMServer,
ReactTestUtils,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,18 @@ const ReactDOMServerIntegrationUtils = require('./utils/ReactDOMServerIntegratio
let React;
let ReactDOMClient;
let ReactDOMServer;
let ReactTestUtils;

function initModules() {
// Reset warning cache.
jest.resetModules();
React = require('react');
ReactDOMClient = require('react-dom/client');
ReactDOMServer = require('react-dom/server');
ReactTestUtils = require('react-dom/test-utils');

// Make them available to the helpers.
return {
ReactDOMClient,
ReactDOMServer,
ReactTestUtils,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const ReactDOMServerIntegrationUtils = require('./utils/ReactDOMServerIntegratio
let React;
let ReactDOMClient;
let ReactDOMServer;
let ReactTestUtils;
let forwardRef;
let memo;
let yieldedValues;
Expand All @@ -28,7 +27,6 @@ function initModules() {
React = require('react');
ReactDOMClient = require('react-dom/client');
ReactDOMServer = require('react-dom/server');
ReactTestUtils = require('react-dom/test-utils');
forwardRef = React.forwardRef;
memo = React.memo;

Expand All @@ -46,7 +44,6 @@ function initModules() {
return {
ReactDOMClient,
ReactDOMServer,
ReactTestUtils,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,18 @@ const ReactDOMServerIntegrationUtils = require('./utils/ReactDOMServerIntegratio
let React;
let ReactDOMClient;
let ReactDOMServer;
let ReactTestUtils;

function initModules() {
// Reset warning cache.
jest.resetModules();
React = require('react');
ReactDOMClient = require('react-dom/client');
ReactDOMServer = require('react-dom/server');
ReactTestUtils = require('react-dom/test-utils');

// Make them available to the helpers.
return {
ReactDOMClient,
ReactDOMServer,
ReactTestUtils,
};
}

Expand Down
Loading