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:
James Burnett 2017-06-08 07:36:21 -07:00 коммит произвёл Facebook Github Bot
Родитель ba2e486b33
Коммит 3360999431
34 изменённых файлов: 39 добавлений и 45 удалений

Просмотреть файл

@ -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';