Replace jest.resetModuleRegistry() with jest.resetModules()
Reviewed By: cpojer Differential Revision: D4344961 fbshipit-source-id: 45453ec7ee3211743946ab9156f51430322b5832
This commit is contained in:
parent
1052d29fac
commit
4aabf4b6b3
|
@ -35,7 +35,7 @@ const assertQueue = (flushedQueue, index, moduleID, methodID, params) => {
|
|||
// local callbacks stored by IDs are cleaned up.
|
||||
describe('MessageQueue', function() {
|
||||
beforeEach(function() {
|
||||
jest.resetModuleRegistry();
|
||||
jest.resetModules();
|
||||
MessageQueue = require('MessageQueue');
|
||||
MessageQueueTestModule = require('MessageQueueTestModule');
|
||||
queue = new MessageQueue();
|
||||
|
|
|
@ -40,7 +40,7 @@ const assertQueue = (flushedQueue, index, moduleID, methodID, params) => {
|
|||
// [ ] Remote invocation throws if not supplying an error callback.
|
||||
describe('MessageQueue', function() {
|
||||
beforeEach(function() {
|
||||
jest.resetModuleRegistry();
|
||||
jest.resetModules();
|
||||
|
||||
global.__fbBatchedBridgeConfig = require('MessageQueueTestConfig');
|
||||
BatchedBridge = require('BatchedBridge');
|
||||
|
|
|
@ -26,7 +26,7 @@ function expectResolvesAsset(input, expectedSource) {
|
|||
|
||||
describe('resolveAssetSource', () => {
|
||||
beforeEach(() => {
|
||||
jest.resetModuleRegistry();
|
||||
jest.resetModules();
|
||||
});
|
||||
|
||||
it('returns same source for simple static and network images', () => {
|
||||
|
|
|
@ -25,7 +25,7 @@ describe('InteractionManager', () => {
|
|||
let interactionComplete;
|
||||
|
||||
beforeEach(() => {
|
||||
jest.resetModuleRegistry();
|
||||
jest.resetModules();
|
||||
InteractionManager = require('InteractionManager');
|
||||
|
||||
interactionStart = jest.fn();
|
||||
|
@ -163,7 +163,7 @@ describe('promise tasks', () => {
|
|||
});
|
||||
}
|
||||
beforeEach(() => {
|
||||
jest.resetModuleRegistry();
|
||||
jest.resetModules();
|
||||
InteractionManager = require('InteractionManager');
|
||||
BatchedBridge = require('BatchedBridge');
|
||||
sequenceId = 0;
|
||||
|
|
|
@ -17,7 +17,7 @@ describe('InteractionMixin', () => {
|
|||
var component;
|
||||
|
||||
beforeEach(() => {
|
||||
jest.resetModuleRegistry();
|
||||
jest.resetModules();
|
||||
InteractionManager = require('InteractionManager');
|
||||
InteractionMixin = require('InteractionMixin');
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ describe('TaskQueue', () => {
|
|||
});
|
||||
}
|
||||
beforeEach(() => {
|
||||
jest.resetModuleRegistry();
|
||||
jest.resetModules();
|
||||
onMoreTasks = jest.fn();
|
||||
const TaskQueue = require('TaskQueue');
|
||||
taskQueue = new TaskQueue({onMoreTasks});
|
||||
|
|
|
@ -19,7 +19,7 @@ describe('Object (ES7)', () => {
|
|||
beforeEach(() => {
|
||||
delete Object.entries;
|
||||
delete Object.values;
|
||||
jest.resetModuleRegistry();
|
||||
jest.resetModules();
|
||||
require('../Object.es7');
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue