2015-03-23 22:07:33 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* This source code is licensed under the BSD-style license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
*/
|
2015-03-02 18:42:31 +00:00
|
|
|
'use strict';
|
|
|
|
|
2016-03-15 01:52:14 +00:00
|
|
|
require.requireActual('../packager/react-packager/src/Resolver/polyfills/babelHelpers.js');
|
2016-07-28 05:02:42 +00:00
|
|
|
require.requireActual('../packager/react-packager/src/Resolver/polyfills/Object.es7.js');
|
2016-03-15 01:52:14 +00:00
|
|
|
|
2015-09-16 17:30:53 +00:00
|
|
|
global.__DEV__ = true;
|
2015-12-22 01:52:20 +00:00
|
|
|
global.__fbBatchedBridgeConfig = {
|
|
|
|
remoteModuleConfig: [],
|
|
|
|
localModulesConfig: [],
|
|
|
|
};
|
|
|
|
|
|
|
|
global.Promise = require('promise');
|
2016-05-04 12:18:42 +00:00
|
|
|
global.regeneratorRuntime = require.requireActual('regenerator-runtime/runtime');
|
2016-01-08 14:51:45 +00:00
|
|
|
|
2016-07-28 05:02:42 +00:00
|
|
|
jest
|
|
|
|
.mock('ensureComponentIsNative')
|
|
|
|
.mock('Image')
|
2016-07-30 15:59:16 +00:00
|
|
|
.mock('npmlog')
|
2016-07-28 05:02:42 +00:00
|
|
|
.mock('NativeModules')
|
|
|
|
.mock('Text')
|
|
|
|
.mock('View');
|
|
|
|
|
|
|
|
const mockEmptyObject = {};
|
|
|
|
jest.mock('ReactNativePropRegistry', () => ({
|
|
|
|
register: id => id,
|
|
|
|
getByID: () => mockEmptyObject,
|
|
|
|
}));
|
|
|
|
|
2016-01-08 14:51:45 +00:00
|
|
|
jest.setMock('ErrorUtils', require('ErrorUtils'));
|