Permalink
Browse files

disable automock by default in as many places as possible @bypass-lint

Reviewed By: cpojer

Differential Revision: D5190858

fbshipit-source-id: d3125cf81427dbbe3362ef1f958413394a6dc51d
  • Loading branch information...
James Burnett authored and facebook-github-bot committed Jun 8, 2017
1 parent ba2e486 commit 3360999431b4ed931068ac2f96c8234cdd1f6662
Showing with 39 additions and 45 deletions.
  1. +1 −1 Libraries/Animated/src/__tests__/Easing-test.js
  2. +1 −4 Libraries/Animated/src/__tests__/Interpolation-test.js
  3. +1 −1 Libraries/Animated/src/__tests__/bezier-test.js
  4. +1 −2 Libraries/BatchedBridge/__tests__/MessageQueue-test.js
  5. +6 −4 Libraries/BatchedBridge/__tests__/NativeModules-test.js
  6. +1 −5 Libraries/Image/__tests__/resolveAssetSource-test.js
  7. +1 −1 Libraries/Interaction/__tests__/InteractionMixin-test.js
  8. +1 −1 Libraries/Interaction/__tests__/TaskQueue-test.js
  9. +1 −1 Libraries/Lists/__tests__/FillRateHelper-test.js
  10. +1 −1 Libraries/Lists/__tests__/ViewabilityHelper-test.js
  11. +1 −1 Libraries/Lists/__tests__/VirtualizeUtils-test.js
  12. +1 −1 Libraries/Network/__tests__/FormData-test.js
  13. +1 −1 Libraries/StyleSheet/__tests__/normalizeColor-test.js
  14. +1 −2 Libraries/StyleSheet/__tests__/setNormalizedColorAlpha-test.js
  15. +1 −2 Libraries/Utilities/__tests__/MatrixMath-test.js
  16. +1 −2 Libraries/Utilities/__tests__/Platform-test.js
  17. +1 −1 Libraries/Utilities/__tests__/SceneTracker-test.js
  18. +1 −1 Libraries/Utilities/__tests__/buildStyleInterpolator-test.js
  19. +1 −1 Libraries/Utilities/__tests__/deepFreezeAndThrowOnMutationInDev-test.js
  20. +1 −1 Libraries/Utilities/__tests__/groupByEveryN-test.js
  21. +1 −1 Libraries/Utilities/__tests__/mapWithSeparator-test.js
  22. +1 −1 Libraries/Utilities/__tests__/truncate-test.js
  23. +1 −1 Libraries/Utilities/differ/__tests__/deepDiffer-test.js
  24. +1 −1 Libraries/WebSocket/__tests__/WebSocket-test.js
  25. +1 −1 local-cli/bundle/__tests__/filterPlatformAssetScales-test.js
  26. +1 −1 local-cli/bundle/__tests__/getAssetDestPathAndroid-test.js
  27. +1 −1 local-cli/bundle/__tests__/getAssetDestPathIOS-test.js
  28. +1 −0 local-cli/core/__tests__/makeCommand.spec.js
  29. +1 −1 local-cli/runIOS/__tests__/findMatchingSimulator-test.js
  30. +1 −1 local-cli/runIOS/__tests__/findXcodeProject-test.js
  31. +1 −1 local-cli/runIOS/__tests__/parseIOSDevicesList-test.js
  32. +1 −1 local-cli/server/util/__tests__/getInverseDependencies-test.js
  33. +1 −0 local-cli/templates/HelloWorld/__tests__/index.android.js
  34. +1 −0 local-cli/templates/HelloWorld/__tests__/index.ios.js
@@ -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';

0 comments on commit 3360999

Please sign in to comment.