Skip to content

Commit efaa26e

Browse files
authored
Upgrade jest APIs to match www (#8536)
D4298654, D4298713
1 parent f1e193b commit efaa26e

File tree

54 files changed

+62
-62
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+62
-62
lines changed

src/addons/transitions/__tests__/ReactCSSTransitionGroup-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe('ReactCSSTransitionGroup', () => {
2323
var container;
2424

2525
beforeEach(() => {
26-
jest.resetModuleRegistry();
26+
jest.resetModules();
2727
React = require('React');
2828
ReactDOM = require('ReactDOM');
2929
ReactCSSTransitionGroup = require('ReactCSSTransitionGroup');

src/isomorphic/children/__tests__/ReactChildren-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe('ReactChildren', () => {
1616
var ReactFragment;
1717

1818
beforeEach(() => {
19-
jest.resetModuleRegistry();
19+
jest.resetModules();
2020
React = require('React');
2121
ReactFragment = require('ReactFragment');
2222
});

src/isomorphic/classic/__tests__/ReactContextValidator-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('ReactContextValidator', () => {
2727
}
2828

2929
beforeEach(() => {
30-
jest.resetModuleRegistry();
30+
jest.resetModules();
3131

3232
React = require('React');
3333
ReactDOM = require('ReactDOM');

src/isomorphic/classic/element/__tests__/ReactElement-test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe('ReactElement', () => {
2121
var originalSymbol;
2222

2323
beforeEach(() => {
24-
jest.resetModuleRegistry();
24+
jest.resetModules();
2525

2626
// Delete the native Symbol if we have one to ensure we test the
2727
// unpolyfilled environment.
@@ -500,7 +500,7 @@ describe('ReactElement', () => {
500500
return OTHER_SYMBOL;
501501
};
502502

503-
jest.resetModuleRegistry();
503+
jest.resetModules();
504504

505505
React = require('React');
506506

@@ -533,7 +533,7 @@ describe('comparing jsx vs .createFactory() vs .createElement()', () => {
533533
var Child;
534534

535535
beforeEach(() => {
536-
jest.resetModuleRegistry();
536+
jest.resetModules();
537537
React = require('React');
538538
ReactDOM = require('ReactDOM');
539539
ReactTestUtils = require('ReactTestUtils');

src/isomorphic/classic/element/__tests__/ReactElementValidator-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe('ReactElementValidator', () => {
2626
var ComponentClass;
2727

2828
beforeEach(() => {
29-
jest.resetModuleRegistry();
29+
jest.resetModules();
3030

3131
React = require('React');
3232
ReactDOM = require('ReactDOM');

src/isomorphic/classic/types/__tests__/ReactPropTypes-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ describe('ReactPropTypes', () => {
837837

838838
describe('Custom validator', () => {
839839
beforeEach(() => {
840-
jest.resetModuleRegistry();
840+
jest.resetModules();
841841
});
842842

843843
it('should have been called with the right params', () => {

src/isomorphic/classic/types/__tests__/ReactPropTypesProduction-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe('ReactPropTypesProduction', function() {
2626
env: Object.assign({}, process.env, {NODE_ENV: 'production'}),
2727
};
2828

29-
jest.resetModuleRegistry();
29+
jest.resetModules();
3030
PropTypes = require('ReactPropTypes');
3131
React = require('React');
3232
ReactPropTypeLocations = require('ReactPropTypeLocations');
@@ -200,7 +200,7 @@ describe('ReactPropTypesProduction', function() {
200200

201201
describe('Custom validator', function() {
202202
beforeEach(function() {
203-
jest.resetModuleRegistry();
203+
jest.resetModules();
204204
});
205205

206206
it('should not have been called', function() {

src/isomorphic/modern/element/__tests__/ReactJSXElement-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe('ReactJSXElement', () => {
1919
var Component;
2020

2121
beforeEach(() => {
22-
jest.resetModuleRegistry();
22+
jest.resetModules();
2323

2424
React = require('React');
2525
ReactDOM = require('ReactDOM');

src/isomorphic/modern/element/__tests__/ReactJSXElementValidator-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe('ReactJSXElementValidator', () => {
2323
var RequiredPropComponent;
2424

2525
beforeEach(() => {
26-
jest.resetModuleRegistry();
26+
jest.resetModules();
2727

2828
React = require('React');
2929
ReactDOM = require('ReactDOM');

src/renderers/dom/__tests__/ReactDOMProduction-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ describe('ReactDOMProduction', () => {
2525
env: Object.assign({}, process.env, {NODE_ENV: 'production'}),
2626
};
2727

28-
jest.resetModuleRegistry();
28+
jest.resetModules();
2929
React = require('React');
3030
ReactDOM = require('ReactDOM');
3131
});

0 commit comments

Comments
 (0)