Skip to content

Commit

Permalink
jest.resetModuleRegistry -> jest.resetModules
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Jun 30, 2021
1 parent fceea78 commit 377d076
Show file tree
Hide file tree
Showing 28 changed files with 29 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let ReactDOMServer;

function initModules() {
// Reset warning cache.
jest.resetModuleRegistry();
jest.resetModules();
React = require('react');
ReactDOM = require('react-dom');
ReactDOMServer = require('react-dom/server');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ let ReactTestUtils;

function initModules() {
// Reset warning cache.
jest.resetModuleRegistry();
jest.resetModules();
React = require('react');
ReactDOM = require('react-dom');
ReactDOMServer = require('react-dom/server');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ let ReactTestUtils;

function initModules() {
// Reset warning cache.
jest.resetModuleRegistry();
jest.resetModules();
React = require('react');
ReactDOM = require('react-dom');
ReactDOMServer = require('react-dom/server');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let ReactTestUtils;

function initModules() {
// Reset warning cache.
jest.resetModuleRegistry();
jest.resetModules();
React = require('react');
ReactDOM = require('react-dom');
ReactDOMServer = require('react-dom/server');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ let ReactDOMServer;
let ReactTestUtils;

function initModules() {
jest.resetModuleRegistry();
jest.resetModules();
React = require('react');
ReactDOM = require('react-dom');
ReactDOMServer = require('react-dom/server');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let ReactTestUtils;

function initModules() {
// Reset warning cache.
jest.resetModuleRegistry();
jest.resetModules();
React = require('react');
ReactDOM = require('react-dom');
ReactDOMServer = require('react-dom/server');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ let clearYields;

function initModules() {
// Reset warning cache.
jest.resetModuleRegistry();
jest.resetModules();

React = require('react');
ReactDOM = require('react-dom');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ let ReactTestUtils;

function initModules() {
// Reset warning cache.
jest.resetModuleRegistry();
jest.resetModules();
React = require('react');
ReactDOM = require('react-dom');
ReactDOMServer = require('react-dom/server');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ let ReactTestUtils;

function initModules() {
// Reset warning cache.
jest.resetModuleRegistry();
jest.resetModules();
PropTypes = require('prop-types');
React = require('react');
ReactDOM = require('react-dom');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ let ReactTestUtils;

function initModules() {
// Reset warning cache.
jest.resetModuleRegistry();
jest.resetModules();
React = require('react');
ReactDOM = require('react-dom');
ReactDOMServer = require('react-dom/server');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let ReactTestUtils;

function initModules() {
// Reset warning cache.
jest.resetModuleRegistry();
jest.resetModules();
React = require('react');
ReactDOM = require('react-dom');
ReactDOMServer = require('react-dom/server');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let ReactTestUtils;

function initModules() {
// Reset warning cache.
jest.resetModuleRegistry();
jest.resetModules();
React = require('react');
ReactDOM = require('react-dom');
ReactDOMServer = require('react-dom/server');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let ReactTestUtils;

function initModules() {
// Reset warning cache.
jest.resetModuleRegistry();
jest.resetModules();

React = require('react');
ReactDOM = require('react-dom');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let ReactTestUtils;

function initModules() {
// Reset warning cache.
jest.resetModuleRegistry();
jest.resetModules();
React = require('react');
ReactDOM = require('react-dom');
ReactDOMServer = require('react-dom/server');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let ReactTestUtils;

function initModules() {
// Reset warning cache.
jest.resetModuleRegistry();
jest.resetModules();
React = require('react');
ReactDOM = require('react-dom');
ReactDOMServer = require('react-dom/server');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ let clearYields;

function initModules() {
// Reset warning cache.
jest.resetModuleRegistry();
jest.resetModules();
React = require('react');
ReactDOM = require('react-dom');
ReactDOMServer = require('react-dom/server');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let ReactTestUtils;

function initModules() {
// Reset warning cache.
jest.resetModuleRegistry();
jest.resetModules();
React = require('react');
ReactDOM = require('react-dom');
ReactDOMServer = require('react-dom/server');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ function runTests(itRenders, itRejectsRendering, expectToReject) {

describe('ReactDOMServerIntegration - Untrusted URLs', () => {
function initModules() {
jest.resetModuleRegistry();
jest.resetModules();
React = require('react');
ReactDOM = require('react-dom');
ReactDOMServer = require('react-dom/server');
Expand Down Expand Up @@ -181,7 +181,7 @@ describe('ReactDOMServerIntegration - Untrusted URLs', () => {

describe('ReactDOMServerIntegration - Untrusted URLs - disableJavaScriptURLs', () => {
function initModules() {
jest.resetModuleRegistry();
jest.resetModules();
const ReactFeatureFlags = require('shared/ReactFeatureFlags');
ReactFeatureFlags.disableJavaScriptURLs = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let ReactTestUtils;

function initModules() {
// Reset warning cache.
jest.resetModuleRegistry();
jest.resetModules();
React = require('react');
ReactDOM = require('react-dom');
ReactDOMServer = require('react-dom/server');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ let ReactDOMServer;

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function dispatchMouseEvent(to, from) {

describe('ReactDOMServerPartialHydration', () => {
beforeEach(() => {
jest.resetModuleRegistry();
jest.resetModules();

ReactFeatureFlags = require('shared/ReactFeatureFlags');
ReactFeatureFlags.enableSuspenseCallback = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function TODO_scheduleIdleDOMSchedulerTask(fn) {

describe('ReactDOMServerSelectiveHydration', () => {
beforeEach(() => {
jest.resetModuleRegistry();
jest.resetModules();

const ReactFeatureFlags = require('shared/ReactFeatureFlags');
ReactFeatureFlags.enableCreateEventHandleAPI = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ let act;

function initModules() {
// Reset warning cache.
jest.resetModuleRegistry();
jest.resetModules();

React = require('react');
ReactDOM = require('react-dom');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let ReactTestUtils;

function initModules() {
// Reset warning cache.
jest.resetModuleRegistry();
jest.resetModules();
React = require('react');
ReactDOM = require('react-dom');
ReactDOMServer = require('react-dom/server');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function FunctionComponent(props) {

describe('ReactFunctionComponent', () => {
beforeEach(() => {
jest.resetModuleRegistry();
jest.resetModules();
PropTypes = require('prop-types');
React = require('react');
ReactDOM = require('react-dom');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('ReactServerRenderingBrowser', () => {
React = require('react');
ReactDOMServer = require('react-dom/server');
// For extra isolation between what would be two bundles on npm
jest.resetModuleRegistry();
jest.resetModules();
ReactDOMServerBrowser = require('react-dom/server.browser');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('EventPluginRegistry', () => {
let createPlugin;

beforeEach(() => {
jest.resetModuleRegistry();
jest.resetModules();
// These tests are intentionally testing the private injection interface.
// The public API surface of this is covered by other tests so
// if `EventPluginRegistry` is ever deleted, these tests should be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let act;

describe('ReactIncrementalUpdates', () => {
beforeEach(() => {
jest.resetModuleRegistry();
jest.resetModules();

React = require('react');
ReactNoop = require('react-noop-renderer');
Expand Down

0 comments on commit 377d076

Please sign in to comment.