mirror of
https://github.com/status-im/react-native.git
synced 2025-01-13 11:05:21 +00:00
disable automock by default in as many places as possible @bypass-lint
Reviewed By: cpojer Differential Revision: D5190858 fbshipit-source-id: d3125cf81427dbbe3362ef1f958413394a6dc51d
This commit is contained in:
parent
ba2e486b33
commit
3360999431
@ -8,7 +8,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest.unmock('Easing');
|
||||
jest.disableAutomock();
|
||||
|
||||
var Easing = require('Easing');
|
||||
describe('Easing', () => {
|
||||
|
@ -8,10 +8,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest
|
||||
.unmock('Interpolation')
|
||||
.unmock('Easing')
|
||||
.unmock('normalizeColor');
|
||||
jest.disableAutomock();
|
||||
|
||||
var Interpolation = require('Interpolation');
|
||||
var Easing = require('Easing');
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
jest.unmock('bezier');
|
||||
jest.disableAutomock();
|
||||
var bezier = require('bezier');
|
||||
|
||||
var identity = function (x) { return x; };
|
||||
|
@ -10,8 +10,7 @@
|
||||
'use strict';
|
||||
|
||||
// const MessageQueueTestConfig = require('MessageQueueTestConfig');
|
||||
jest.unmock('MessageQueue');
|
||||
jest.unmock('defineLazyObjectProperty');
|
||||
jest.disableAutomock();
|
||||
|
||||
let MessageQueue;
|
||||
let MessageQueueTestModule;
|
||||
|
@ -9,10 +9,12 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest.unmock('BatchedBridge');
|
||||
jest.unmock('defineLazyObjectProperty');
|
||||
jest.unmock('MessageQueue');
|
||||
jest.unmock('NativeModules');
|
||||
jest
|
||||
.enableAutomock()
|
||||
.unmock('BatchedBridge')
|
||||
.unmock('defineLazyObjectProperty')
|
||||
.unmock('MessageQueue')
|
||||
.unmock('NativeModules');
|
||||
|
||||
let BatchedBridge;
|
||||
let NativeModules;
|
||||
|
@ -8,11 +8,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest
|
||||
.unmock('AssetRegistry')
|
||||
.unmock('AssetSourceResolver')
|
||||
.unmock('../resolveAssetSource')
|
||||
.unmock('../../../local-cli/bundle/assetPathUtils');
|
||||
jest.disableAutomock();
|
||||
|
||||
var AssetRegistry = require('AssetRegistry');
|
||||
var Platform = require('Platform');
|
||||
|
@ -9,7 +9,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest.unmock('InteractionMixin');
|
||||
jest.enableAutomock().unmock('InteractionMixin');
|
||||
|
||||
describe('InteractionMixin', () => {
|
||||
var InteractionManager;
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
jest.unmock('TaskQueue');
|
||||
jest.disableAutomock();
|
||||
|
||||
function expectToBeCalledOnce(fn) {
|
||||
expect(fn.mock.calls.length).toBe(1);
|
||||
|
@ -9,7 +9,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest.unmock('FillRateHelper');
|
||||
jest.disableAutomock();
|
||||
|
||||
const FillRateHelper = require('FillRateHelper');
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest.unmock('ViewabilityHelper');
|
||||
jest.disableAutomock();
|
||||
|
||||
const ViewabilityHelper = require('ViewabilityHelper');
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest.unmock('VirtualizeUtils');
|
||||
jest.disableAutomock();
|
||||
|
||||
const { elementsThatOverlapOffsets, newRangeCount } = require('VirtualizeUtils');
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
jest.unmock('FormData');
|
||||
jest.disableAutomock();
|
||||
|
||||
const FormData = require('FormData');
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest.unmock('normalizeColor');
|
||||
jest.disableAutomock();
|
||||
|
||||
var normalizeColor = require('normalizeColor');
|
||||
|
||||
|
@ -8,8 +8,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest.unmock('setNormalizedColorAlpha');
|
||||
jest.unmock('normalizeColor');
|
||||
jest.disableAutomock();
|
||||
|
||||
var setNormalizedColorAlpha = require('setNormalizedColorAlpha');
|
||||
var normalizeColor = require('normalizeColor');
|
||||
|
@ -8,8 +8,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest.unmock('MatrixMath');
|
||||
jest.unmock('fbjs/lib/invariant');
|
||||
jest.disableAutomock();
|
||||
|
||||
var MatrixMath = require('MatrixMath');
|
||||
|
||||
|
@ -8,8 +8,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest.unmock('../Platform.ios');
|
||||
jest.unmock('../Platform.android');
|
||||
jest.disableAutomock();
|
||||
|
||||
var PlatformIOS = require('../Platform.ios');
|
||||
var PlatformAndroid = require('../Platform.android');
|
||||
|
@ -9,7 +9,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest.unmock('SceneTracker');
|
||||
jest.disableAutomock();
|
||||
|
||||
const SceneTracker = require('SceneTracker');
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest.unmock('buildStyleInterpolator');
|
||||
jest.disableAutomock();
|
||||
|
||||
var buildStyleInterpolator = require('buildStyleInterpolator');
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*
|
||||
*/
|
||||
jest.unmock('deepFreezeAndThrowOnMutationInDev');
|
||||
jest.disableAutomock();
|
||||
var deepFreezeAndThrowOnMutationInDev = require('deepFreezeAndThrowOnMutationInDev');
|
||||
|
||||
describe('deepFreezeAndThrowOnMutationInDev', function() {
|
||||
|
@ -9,7 +9,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest.unmock('groupByEveryN');
|
||||
jest.disableAutomock();
|
||||
|
||||
describe('groupByEveryN', () => {
|
||||
var groupByEveryN = require('groupByEveryN');
|
||||
|
@ -8,7 +8,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest.unmock('mapWithSeparator');
|
||||
jest.disableAutomock();
|
||||
|
||||
describe('mapWithSeparator', () => {
|
||||
const mapWithSeparator = require('mapWithSeparator');
|
||||
|
@ -9,7 +9,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest.unmock('truncate');
|
||||
jest.disableAutomock();
|
||||
|
||||
describe('truncate', () => {
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest.unmock('deepDiffer');
|
||||
jest.disableAutomock();
|
||||
var deepDiffer = require('deepDiffer');
|
||||
|
||||
describe('deepDiffer', function() {
|
||||
|
@ -3,7 +3,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest.unmock('WebSocket');
|
||||
jest.enableAutomock().unmock('WebSocket');
|
||||
jest.setMock('NativeModules', {
|
||||
WebSocketModule: {
|
||||
connect: () => {}
|
||||
|
@ -8,7 +8,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest
|
||||
jest.disableAutomock()
|
||||
.dontMock('../filterPlatformAssetScales')
|
||||
.dontMock('../assetPathUtils');
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest
|
||||
jest.disableAutomock()
|
||||
.dontMock('../getAssetDestPathAndroid')
|
||||
.dontMock('../assetPathUtils');
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest.dontMock('../getAssetDestPathIOS');
|
||||
jest.disableAutomock().dontMock('../getAssetDestPathIOS');
|
||||
|
||||
const getAssetDestPathIOS = require('../getAssetDestPathIOS');
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
jest.disableAutomock();
|
||||
var spawnError = false;
|
||||
|
||||
jest.setMock('child_process', {
|
||||
|
@ -9,7 +9,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest.dontMock('../findMatchingSimulator');
|
||||
jest.disableAutomock().dontMock('../findMatchingSimulator');
|
||||
|
||||
const findMatchingSimulator = require('../findMatchingSimulator');
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest.dontMock('../findXcodeProject');
|
||||
jest.disableAutomock().dontMock('../findXcodeProject');
|
||||
|
||||
const findXcodeProject = require('../findXcodeProject');
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
jest.dontMock('../parseIOSDevicesList');
|
||||
jest.disableAutomock().dontMock('../parseIOSDevicesList');
|
||||
var parseIOSDevicesList = require('../parseIOSDevicesList');
|
||||
|
||||
describe('parseIOSDevicesList', () => {
|
||||
|
@ -8,7 +8,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
jest.dontMock('../getInverseDependencies');
|
||||
jest.disableAutomock().dontMock('../getInverseDependencies');
|
||||
|
||||
const getInverseDependencies = require('../getInverseDependencies');
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
jest.disableAutomock();
|
||||
import 'react-native';
|
||||
import React from 'react';
|
||||
import Index from '../index.android.js';
|
||||
|
@ -1,3 +1,4 @@
|
||||
jest.disableAutomock();
|
||||
import 'react-native';
|
||||
import React from 'react';
|
||||
import Index from '../index.ios.js';
|
||||
|
Loading…
x
Reference in New Issue
Block a user