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';
|
'use strict';
|
||||||
|
|
||||||
jest.unmock('Easing');
|
jest.disableAutomock();
|
||||||
|
|
||||||
var Easing = require('Easing');
|
var Easing = require('Easing');
|
||||||
describe('Easing', () => {
|
describe('Easing', () => {
|
||||||
|
@ -8,10 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
jest
|
jest.disableAutomock();
|
||||||
.unmock('Interpolation')
|
|
||||||
.unmock('Easing')
|
|
||||||
.unmock('normalizeColor');
|
|
||||||
|
|
||||||
var Interpolation = require('Interpolation');
|
var Interpolation = require('Interpolation');
|
||||||
var Easing = require('Easing');
|
var Easing = require('Easing');
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
jest.unmock('bezier');
|
jest.disableAutomock();
|
||||||
var bezier = require('bezier');
|
var bezier = require('bezier');
|
||||||
|
|
||||||
var identity = function (x) { return x; };
|
var identity = function (x) { return x; };
|
||||||
|
@ -10,8 +10,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// const MessageQueueTestConfig = require('MessageQueueTestConfig');
|
// const MessageQueueTestConfig = require('MessageQueueTestConfig');
|
||||||
jest.unmock('MessageQueue');
|
jest.disableAutomock();
|
||||||
jest.unmock('defineLazyObjectProperty');
|
|
||||||
|
|
||||||
let MessageQueue;
|
let MessageQueue;
|
||||||
let MessageQueueTestModule;
|
let MessageQueueTestModule;
|
||||||
|
@ -9,10 +9,12 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
jest.unmock('BatchedBridge');
|
jest
|
||||||
jest.unmock('defineLazyObjectProperty');
|
.enableAutomock()
|
||||||
jest.unmock('MessageQueue');
|
.unmock('BatchedBridge')
|
||||||
jest.unmock('NativeModules');
|
.unmock('defineLazyObjectProperty')
|
||||||
|
.unmock('MessageQueue')
|
||||||
|
.unmock('NativeModules');
|
||||||
|
|
||||||
let BatchedBridge;
|
let BatchedBridge;
|
||||||
let NativeModules;
|
let NativeModules;
|
||||||
|
@ -8,11 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
jest
|
jest.disableAutomock();
|
||||||
.unmock('AssetRegistry')
|
|
||||||
.unmock('AssetSourceResolver')
|
|
||||||
.unmock('../resolveAssetSource')
|
|
||||||
.unmock('../../../local-cli/bundle/assetPathUtils');
|
|
||||||
|
|
||||||
var AssetRegistry = require('AssetRegistry');
|
var AssetRegistry = require('AssetRegistry');
|
||||||
var Platform = require('Platform');
|
var Platform = require('Platform');
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
jest.unmock('InteractionMixin');
|
jest.enableAutomock().unmock('InteractionMixin');
|
||||||
|
|
||||||
describe('InteractionMixin', () => {
|
describe('InteractionMixin', () => {
|
||||||
var InteractionManager;
|
var InteractionManager;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
jest.unmock('TaskQueue');
|
jest.disableAutomock();
|
||||||
|
|
||||||
function expectToBeCalledOnce(fn) {
|
function expectToBeCalledOnce(fn) {
|
||||||
expect(fn.mock.calls.length).toBe(1);
|
expect(fn.mock.calls.length).toBe(1);
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
jest.unmock('FillRateHelper');
|
jest.disableAutomock();
|
||||||
|
|
||||||
const FillRateHelper = require('FillRateHelper');
|
const FillRateHelper = require('FillRateHelper');
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
jest.unmock('ViewabilityHelper');
|
jest.disableAutomock();
|
||||||
|
|
||||||
const ViewabilityHelper = require('ViewabilityHelper');
|
const ViewabilityHelper = require('ViewabilityHelper');
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
jest.unmock('VirtualizeUtils');
|
jest.disableAutomock();
|
||||||
|
|
||||||
const { elementsThatOverlapOffsets, newRangeCount } = require('VirtualizeUtils');
|
const { elementsThatOverlapOffsets, newRangeCount } = require('VirtualizeUtils');
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
jest.unmock('FormData');
|
jest.disableAutomock();
|
||||||
|
|
||||||
const FormData = require('FormData');
|
const FormData = require('FormData');
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
jest.unmock('normalizeColor');
|
jest.disableAutomock();
|
||||||
|
|
||||||
var normalizeColor = require('normalizeColor');
|
var normalizeColor = require('normalizeColor');
|
||||||
|
|
||||||
|
@ -8,8 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
jest.unmock('setNormalizedColorAlpha');
|
jest.disableAutomock();
|
||||||
jest.unmock('normalizeColor');
|
|
||||||
|
|
||||||
var setNormalizedColorAlpha = require('setNormalizedColorAlpha');
|
var setNormalizedColorAlpha = require('setNormalizedColorAlpha');
|
||||||
var normalizeColor = require('normalizeColor');
|
var normalizeColor = require('normalizeColor');
|
||||||
|
@ -8,8 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
jest.unmock('MatrixMath');
|
jest.disableAutomock();
|
||||||
jest.unmock('fbjs/lib/invariant');
|
|
||||||
|
|
||||||
var MatrixMath = require('MatrixMath');
|
var MatrixMath = require('MatrixMath');
|
||||||
|
|
||||||
|
@ -8,8 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
jest.unmock('../Platform.ios');
|
jest.disableAutomock();
|
||||||
jest.unmock('../Platform.android');
|
|
||||||
|
|
||||||
var PlatformIOS = require('../Platform.ios');
|
var PlatformIOS = require('../Platform.ios');
|
||||||
var PlatformAndroid = require('../Platform.android');
|
var PlatformAndroid = require('../Platform.android');
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
jest.unmock('SceneTracker');
|
jest.disableAutomock();
|
||||||
|
|
||||||
const SceneTracker = require('SceneTracker');
|
const SceneTracker = require('SceneTracker');
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
jest.unmock('buildStyleInterpolator');
|
jest.disableAutomock();
|
||||||
|
|
||||||
var buildStyleInterpolator = require('buildStyleInterpolator');
|
var buildStyleInterpolator = require('buildStyleInterpolator');
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
* of patent rights can be found in the PATENTS file in the same directory.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
jest.unmock('deepFreezeAndThrowOnMutationInDev');
|
jest.disableAutomock();
|
||||||
var deepFreezeAndThrowOnMutationInDev = require('deepFreezeAndThrowOnMutationInDev');
|
var deepFreezeAndThrowOnMutationInDev = require('deepFreezeAndThrowOnMutationInDev');
|
||||||
|
|
||||||
describe('deepFreezeAndThrowOnMutationInDev', function() {
|
describe('deepFreezeAndThrowOnMutationInDev', function() {
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
jest.unmock('groupByEveryN');
|
jest.disableAutomock();
|
||||||
|
|
||||||
describe('groupByEveryN', () => {
|
describe('groupByEveryN', () => {
|
||||||
var groupByEveryN = require('groupByEveryN');
|
var groupByEveryN = require('groupByEveryN');
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
jest.unmock('mapWithSeparator');
|
jest.disableAutomock();
|
||||||
|
|
||||||
describe('mapWithSeparator', () => {
|
describe('mapWithSeparator', () => {
|
||||||
const mapWithSeparator = require('mapWithSeparator');
|
const mapWithSeparator = require('mapWithSeparator');
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
jest.unmock('truncate');
|
jest.disableAutomock();
|
||||||
|
|
||||||
describe('truncate', () => {
|
describe('truncate', () => {
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
jest.unmock('deepDiffer');
|
jest.disableAutomock();
|
||||||
var deepDiffer = require('deepDiffer');
|
var deepDiffer = require('deepDiffer');
|
||||||
|
|
||||||
describe('deepDiffer', function() {
|
describe('deepDiffer', function() {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
jest.unmock('WebSocket');
|
jest.enableAutomock().unmock('WebSocket');
|
||||||
jest.setMock('NativeModules', {
|
jest.setMock('NativeModules', {
|
||||||
WebSocketModule: {
|
WebSocketModule: {
|
||||||
connect: () => {}
|
connect: () => {}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
jest
|
jest.disableAutomock()
|
||||||
.dontMock('../filterPlatformAssetScales')
|
.dontMock('../filterPlatformAssetScales')
|
||||||
.dontMock('../assetPathUtils');
|
.dontMock('../assetPathUtils');
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
jest
|
jest.disableAutomock()
|
||||||
.dontMock('../getAssetDestPathAndroid')
|
.dontMock('../getAssetDestPathAndroid')
|
||||||
.dontMock('../assetPathUtils');
|
.dontMock('../assetPathUtils');
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
jest.dontMock('../getAssetDestPathIOS');
|
jest.disableAutomock().dontMock('../getAssetDestPathIOS');
|
||||||
|
|
||||||
const getAssetDestPathIOS = require('../getAssetDestPathIOS');
|
const getAssetDestPathIOS = require('../getAssetDestPathIOS');
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
jest.disableAutomock();
|
||||||
var spawnError = false;
|
var spawnError = false;
|
||||||
|
|
||||||
jest.setMock('child_process', {
|
jest.setMock('child_process', {
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
jest.dontMock('../findMatchingSimulator');
|
jest.disableAutomock().dontMock('../findMatchingSimulator');
|
||||||
|
|
||||||
const findMatchingSimulator = require('../findMatchingSimulator');
|
const findMatchingSimulator = require('../findMatchingSimulator');
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
jest.dontMock('../findXcodeProject');
|
jest.disableAutomock().dontMock('../findXcodeProject');
|
||||||
|
|
||||||
const findXcodeProject = require('../findXcodeProject');
|
const findXcodeProject = require('../findXcodeProject');
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
jest.dontMock('../parseIOSDevicesList');
|
jest.disableAutomock().dontMock('../parseIOSDevicesList');
|
||||||
var parseIOSDevicesList = require('../parseIOSDevicesList');
|
var parseIOSDevicesList = require('../parseIOSDevicesList');
|
||||||
|
|
||||||
describe('parseIOSDevicesList', () => {
|
describe('parseIOSDevicesList', () => {
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
jest.dontMock('../getInverseDependencies');
|
jest.disableAutomock().dontMock('../getInverseDependencies');
|
||||||
|
|
||||||
const getInverseDependencies = require('../getInverseDependencies');
|
const getInverseDependencies = require('../getInverseDependencies');
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
jest.disableAutomock();
|
||||||
import 'react-native';
|
import 'react-native';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Index from '../index.android.js';
|
import Index from '../index.android.js';
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
jest.disableAutomock();
|
||||||
import 'react-native';
|
import 'react-native';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Index from '../index.ios.js';
|
import Index from '../index.ios.js';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user