Skip to content

Commit

Permalink
remove disableAutomock from jest tests (new default) @bypass-lint
Browse files Browse the repository at this point in the history
Reviewed By: cpojer

Differential Revision: D5237192

fbshipit-source-id: dccca52a91259d7fea27931f92bca94184a82d4a
  • Loading branch information
James Burnett authored and facebook-github-bot committed Jun 13, 2017
1 parent 7707905 commit 51c0e81
Show file tree
Hide file tree
Showing 86 changed files with 59 additions and 207 deletions.
2 changes: 0 additions & 2 deletions Libraries/Animated/src/__tests__/Animated-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
*/
'use strict';

jest.disableAutomock();

var Animated = require('Animated');
describe('Animated tests', () => {
beforeEach(() => {
Expand Down
1 change: 0 additions & 1 deletion Libraries/Animated/src/__tests__/AnimatedNative-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
'use strict';

jest
.disableAutomock()
.setMock('Text', {})
.setMock('View', {})
.setMock('Image', {})
Expand Down
2 changes: 0 additions & 2 deletions Libraries/Animated/src/__tests__/Easing-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
*/
'use strict';

jest.disableAutomock();

var Easing = require('Easing');
describe('Easing', () => {
it('should work with linear', () => {
Expand Down
2 changes: 0 additions & 2 deletions Libraries/Animated/src/__tests__/Interpolation-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
*/
'use strict';

jest.disableAutomock();

var Interpolation = require('Interpolation');
var Easing = require('Easing');

Expand Down
1 change: 0 additions & 1 deletion Libraries/Animated/src/__tests__/bezier-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

'use strict';

jest.disableAutomock();
var bezier = require('bezier');

var identity = function (x) { return x; };
Expand Down
3 changes: 0 additions & 3 deletions Libraries/BatchedBridge/__tests__/MessageQueue-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
*/
'use strict';

// const MessageQueueTestConfig = require('MessageQueueTestConfig');
jest.disableAutomock();

let MessageQueue;
let MessageQueueTestModule;
let queue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
*/
'use strict';

jest.disableAutomock();

const React = require('React');
const ReactTestRenderer = require('react-test-renderer');
const Text = require('Text');
Expand Down
2 changes: 0 additions & 2 deletions Libraries/Core/Devtools/__tests__/parseErrorStack-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
'use strict';


jest.disableAutomock();

var parseErrorStack = require('parseErrorStack');

function getFakeError() {
Expand Down
2 changes: 0 additions & 2 deletions Libraries/Image/__tests__/resolveAssetSource-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
*/
'use strict';

jest.disableAutomock();

var AssetRegistry = require('AssetRegistry');
var Platform = require('Platform');
var NativeModules = require('NativeModules');
Expand Down
1 change: 0 additions & 1 deletion Libraries/Interaction/__tests__/Batchinator-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
'use strict';

jest
.disableAutomock()
.mock('ErrorUtils')
.mock('BatchedBridge');

Expand Down
1 change: 0 additions & 1 deletion Libraries/Interaction/__tests__/InteractionManager-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
'use strict';

jest
.disableAutomock()
.mock('ErrorUtils')
.mock('BatchedBridge');

Expand Down
2 changes: 0 additions & 2 deletions Libraries/Interaction/__tests__/TaskQueue-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

'use strict';

jest.disableAutomock();

function expectToBeCalledOnce(fn) {
expect(fn.mock.calls.length).toBe(1);
}
Expand Down
2 changes: 0 additions & 2 deletions Libraries/Lists/__tests__/FillRateHelper-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
*/
'use strict';

jest.disableAutomock();

const FillRateHelper = require('FillRateHelper');

let rowFramesGlobal;
Expand Down
2 changes: 0 additions & 2 deletions Libraries/Lists/__tests__/FlatList-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
*/
'use strict';

jest.disableAutomock();

const React = require('React');
const ReactTestRenderer = require('react-test-renderer');

Expand Down
2 changes: 0 additions & 2 deletions Libraries/Lists/__tests__/SectionList-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
*/
'use strict';

jest.disableAutomock();

const React = require('React');
const ReactTestRenderer = require('react-test-renderer');

Expand Down
2 changes: 0 additions & 2 deletions Libraries/Lists/__tests__/ViewabilityHelper-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
*/
'use strict';

jest.disableAutomock();

const ViewabilityHelper = require('ViewabilityHelper');

let rowFrames;
Expand Down
2 changes: 0 additions & 2 deletions Libraries/Lists/__tests__/VirtualizeUtils-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
*/
'use strict';

jest.disableAutomock();

const {elementsThatOverlapOffsets, newRangeCount} = require('VirtualizeUtils');

describe('newRangeCount', function() {
Expand Down
2 changes: 0 additions & 2 deletions Libraries/Lists/__tests__/VirtualizedList-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
*/
'use strict';

jest.disableAutomock();

const React = require('React');
const ReactTestRenderer = require('react-test-renderer');

Expand Down
2 changes: 0 additions & 2 deletions Libraries/Network/__tests__/FormData-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

'use strict';

jest.disableAutomock();

const FormData = require('FormData');

describe('FormData', function() {
Expand Down
1 change: 0 additions & 1 deletion Libraries/Network/__tests__/XMLHttpRequest-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ function setRequestId(id){
}

jest
.disableAutomock()
.dontMock('event-target-shim')
.setMock('NativeModules', {
Networking: {
Expand Down
2 changes: 0 additions & 2 deletions Libraries/StyleSheet/__tests__/flattenStyle-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
*/
'use strict';

jest.disableAutomock();

var flattenStyle = require('flattenStyle');

describe('flattenStyle', () => {
Expand Down
2 changes: 0 additions & 2 deletions Libraries/StyleSheet/__tests__/normalizeColor-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
*/
'use strict';

jest.disableAutomock();

var normalizeColor = require('normalizeColor');

describe('normalizeColor', function() {
Expand Down
2 changes: 0 additions & 2 deletions Libraries/StyleSheet/__tests__/processColor-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
*/
'use strict';

jest.disableAutomock();

const {OS} = require('Platform');
const processColor = require('processColor');

Expand Down
2 changes: 0 additions & 2 deletions Libraries/StyleSheet/__tests__/processTransform-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
*/
'use strict';

jest.disableAutomock();

const processTransform = require('processTransform');

describe('processTransform', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
*/
'use strict';

jest.disableAutomock();

var setNormalizedColorAlpha = require('setNormalizedColorAlpha');
var normalizeColor = require('normalizeColor');

Expand Down
2 changes: 0 additions & 2 deletions Libraries/Utilities/__tests__/MatrixMath-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
*/
'use strict';

jest.disableAutomock();

var MatrixMath = require('MatrixMath');

function degreesToRadians(degrees) {
Expand Down
2 changes: 0 additions & 2 deletions Libraries/Utilities/__tests__/Platform-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
*/
'use strict';

jest.disableAutomock();

var PlatformIOS = require('../Platform.ios');
var PlatformAndroid = require('../Platform.android');

Expand Down
2 changes: 0 additions & 2 deletions Libraries/Utilities/__tests__/SceneTracker-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
*/
'use strict';

jest.disableAutomock();

const SceneTracker = require('SceneTracker');

describe('setActiveScene', function() {
Expand Down
2 changes: 0 additions & 2 deletions Libraries/Utilities/__tests__/buildStyleInterpolator-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
*/
'use strict';

jest.disableAutomock();

var buildStyleInterpolator = require('buildStyleInterpolator');

var validateEmpty = function(interpolator, value, validator) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
jest.disableAutomock();
var deepFreezeAndThrowOnMutationInDev = require('deepFreezeAndThrowOnMutationInDev');

describe('deepFreezeAndThrowOnMutationInDev', function() {
Expand Down
2 changes: 0 additions & 2 deletions Libraries/Utilities/__tests__/groupByEveryN-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
*/
'use strict';

jest.disableAutomock();

describe('groupByEveryN', () => {
var groupByEveryN = require('groupByEveryN');

Expand Down
2 changes: 0 additions & 2 deletions Libraries/Utilities/__tests__/mapWithSeparator-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
*/
'use strict';

jest.disableAutomock();

describe('mapWithSeparator', () => {
const mapWithSeparator = require('mapWithSeparator');

Expand Down
2 changes: 0 additions & 2 deletions Libraries/Utilities/__tests__/truncate-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
*/
'use strict';

jest.disableAutomock();

describe('truncate', () => {

var truncate = require('truncate');
Expand Down
Loading

0 comments on commit 51c0e81

Please sign in to comment.