diff --git a/Libraries/Animated/src/__tests__/Animated-test.js b/Libraries/Animated/src/__tests__/Animated-test.js index 38b2c4248..d839bc3e7 100644 --- a/Libraries/Animated/src/__tests__/Animated-test.js +++ b/Libraries/Animated/src/__tests__/Animated-test.js @@ -8,8 +8,6 @@ */ 'use strict'; -jest.disableAutomock(); - var Animated = require('Animated'); describe('Animated tests', () => { beforeEach(() => { diff --git a/Libraries/Animated/src/__tests__/AnimatedNative-test.js b/Libraries/Animated/src/__tests__/AnimatedNative-test.js index de204c79b..28a32c89e 100644 --- a/Libraries/Animated/src/__tests__/AnimatedNative-test.js +++ b/Libraries/Animated/src/__tests__/AnimatedNative-test.js @@ -9,7 +9,6 @@ 'use strict'; jest - .disableAutomock() .setMock('Text', {}) .setMock('View', {}) .setMock('Image', {}) diff --git a/Libraries/Animated/src/__tests__/Easing-test.js b/Libraries/Animated/src/__tests__/Easing-test.js index 885c9dd17..aedc168e9 100644 --- a/Libraries/Animated/src/__tests__/Easing-test.js +++ b/Libraries/Animated/src/__tests__/Easing-test.js @@ -8,8 +8,6 @@ */ 'use strict'; -jest.disableAutomock(); - var Easing = require('Easing'); describe('Easing', () => { it('should work with linear', () => { diff --git a/Libraries/Animated/src/__tests__/Interpolation-test.js b/Libraries/Animated/src/__tests__/Interpolation-test.js index 3f0fb8371..442592bd8 100644 --- a/Libraries/Animated/src/__tests__/Interpolation-test.js +++ b/Libraries/Animated/src/__tests__/Interpolation-test.js @@ -8,8 +8,6 @@ */ 'use strict'; -jest.disableAutomock(); - var Interpolation = require('Interpolation'); var Easing = require('Easing'); diff --git a/Libraries/Animated/src/__tests__/bezier-test.js b/Libraries/Animated/src/__tests__/bezier-test.js index 202494ed8..59cf7895c 100644 --- a/Libraries/Animated/src/__tests__/bezier-test.js +++ b/Libraries/Animated/src/__tests__/bezier-test.js @@ -10,7 +10,6 @@ 'use strict'; -jest.disableAutomock(); var bezier = require('bezier'); var identity = function (x) { return x; }; diff --git a/Libraries/BatchedBridge/__tests__/MessageQueue-test.js b/Libraries/BatchedBridge/__tests__/MessageQueue-test.js index 7b6244ee7..38841a854 100644 --- a/Libraries/BatchedBridge/__tests__/MessageQueue-test.js +++ b/Libraries/BatchedBridge/__tests__/MessageQueue-test.js @@ -9,9 +9,6 @@ */ 'use strict'; -// const MessageQueueTestConfig = require('MessageQueueTestConfig'); -jest.disableAutomock(); - let MessageQueue; let MessageQueueTestModule; let queue; diff --git a/Libraries/Components/Touchable/__tests__/TouchableHighlight-test.js b/Libraries/Components/Touchable/__tests__/TouchableHighlight-test.js index 19869d0c4..857e9a3d1 100644 --- a/Libraries/Components/Touchable/__tests__/TouchableHighlight-test.js +++ b/Libraries/Components/Touchable/__tests__/TouchableHighlight-test.js @@ -8,8 +8,6 @@ */ 'use strict'; -jest.disableAutomock(); - const React = require('React'); const ReactTestRenderer = require('react-test-renderer'); const Text = require('Text'); diff --git a/Libraries/Core/Devtools/__tests__/parseErrorStack-test.js b/Libraries/Core/Devtools/__tests__/parseErrorStack-test.js index 8c2c24a04..577b88b1c 100644 --- a/Libraries/Core/Devtools/__tests__/parseErrorStack-test.js +++ b/Libraries/Core/Devtools/__tests__/parseErrorStack-test.js @@ -9,8 +9,6 @@ 'use strict'; -jest.disableAutomock(); - var parseErrorStack = require('parseErrorStack'); function getFakeError() { diff --git a/Libraries/Image/__tests__/resolveAssetSource-test.js b/Libraries/Image/__tests__/resolveAssetSource-test.js index 77ef3a284..061283cb1 100644 --- a/Libraries/Image/__tests__/resolveAssetSource-test.js +++ b/Libraries/Image/__tests__/resolveAssetSource-test.js @@ -8,8 +8,6 @@ */ 'use strict'; -jest.disableAutomock(); - var AssetRegistry = require('AssetRegistry'); var Platform = require('Platform'); var NativeModules = require('NativeModules'); diff --git a/Libraries/Interaction/__tests__/Batchinator-test.js b/Libraries/Interaction/__tests__/Batchinator-test.js index 9ba143073..474dade85 100644 --- a/Libraries/Interaction/__tests__/Batchinator-test.js +++ b/Libraries/Interaction/__tests__/Batchinator-test.js @@ -11,7 +11,6 @@ 'use strict'; jest - .disableAutomock() .mock('ErrorUtils') .mock('BatchedBridge'); diff --git a/Libraries/Interaction/__tests__/InteractionManager-test.js b/Libraries/Interaction/__tests__/InteractionManager-test.js index be967e45d..4e11d7f32 100644 --- a/Libraries/Interaction/__tests__/InteractionManager-test.js +++ b/Libraries/Interaction/__tests__/InteractionManager-test.js @@ -11,7 +11,6 @@ 'use strict'; jest - .disableAutomock() .mock('ErrorUtils') .mock('BatchedBridge'); diff --git a/Libraries/Interaction/__tests__/TaskQueue-test.js b/Libraries/Interaction/__tests__/TaskQueue-test.js index 7b4d98fd0..717668a4b 100644 --- a/Libraries/Interaction/__tests__/TaskQueue-test.js +++ b/Libraries/Interaction/__tests__/TaskQueue-test.js @@ -10,8 +10,6 @@ 'use strict'; -jest.disableAutomock(); - function expectToBeCalledOnce(fn) { expect(fn.mock.calls.length).toBe(1); } diff --git a/Libraries/Lists/__tests__/FillRateHelper-test.js b/Libraries/Lists/__tests__/FillRateHelper-test.js index af5d674af..ffcce7fdf 100644 --- a/Libraries/Lists/__tests__/FillRateHelper-test.js +++ b/Libraries/Lists/__tests__/FillRateHelper-test.js @@ -11,8 +11,6 @@ */ 'use strict'; -jest.disableAutomock(); - const FillRateHelper = require('FillRateHelper'); let rowFramesGlobal; diff --git a/Libraries/Lists/__tests__/FlatList-test.js b/Libraries/Lists/__tests__/FlatList-test.js index 3c493b0c2..15e6eb38b 100644 --- a/Libraries/Lists/__tests__/FlatList-test.js +++ b/Libraries/Lists/__tests__/FlatList-test.js @@ -11,8 +11,6 @@ */ 'use strict'; -jest.disableAutomock(); - const React = require('React'); const ReactTestRenderer = require('react-test-renderer'); diff --git a/Libraries/Lists/__tests__/SectionList-test.js b/Libraries/Lists/__tests__/SectionList-test.js index 74344a0cc..8acc1621e 100644 --- a/Libraries/Lists/__tests__/SectionList-test.js +++ b/Libraries/Lists/__tests__/SectionList-test.js @@ -11,8 +11,6 @@ */ 'use strict'; -jest.disableAutomock(); - const React = require('React'); const ReactTestRenderer = require('react-test-renderer'); diff --git a/Libraries/Lists/__tests__/ViewabilityHelper-test.js b/Libraries/Lists/__tests__/ViewabilityHelper-test.js index c3b9d42bc..9dbcb2c4d 100644 --- a/Libraries/Lists/__tests__/ViewabilityHelper-test.js +++ b/Libraries/Lists/__tests__/ViewabilityHelper-test.js @@ -11,8 +11,6 @@ */ 'use strict'; -jest.disableAutomock(); - const ViewabilityHelper = require('ViewabilityHelper'); let rowFrames; diff --git a/Libraries/Lists/__tests__/VirtualizeUtils-test.js b/Libraries/Lists/__tests__/VirtualizeUtils-test.js index 21bd5cdc4..0efa50b71 100644 --- a/Libraries/Lists/__tests__/VirtualizeUtils-test.js +++ b/Libraries/Lists/__tests__/VirtualizeUtils-test.js @@ -11,8 +11,6 @@ */ 'use strict'; -jest.disableAutomock(); - const {elementsThatOverlapOffsets, newRangeCount} = require('VirtualizeUtils'); describe('newRangeCount', function() { diff --git a/Libraries/Lists/__tests__/VirtualizedList-test.js b/Libraries/Lists/__tests__/VirtualizedList-test.js index 057a940ff..645336fb6 100644 --- a/Libraries/Lists/__tests__/VirtualizedList-test.js +++ b/Libraries/Lists/__tests__/VirtualizedList-test.js @@ -11,8 +11,6 @@ */ 'use strict'; -jest.disableAutomock(); - const React = require('React'); const ReactTestRenderer = require('react-test-renderer'); diff --git a/Libraries/Network/__tests__/FormData-test.js b/Libraries/Network/__tests__/FormData-test.js index b50612962..85d3fac88 100644 --- a/Libraries/Network/__tests__/FormData-test.js +++ b/Libraries/Network/__tests__/FormData-test.js @@ -9,8 +9,6 @@ 'use strict'; -jest.disableAutomock(); - const FormData = require('FormData'); describe('FormData', function() { diff --git a/Libraries/Network/__tests__/XMLHttpRequest-test.js b/Libraries/Network/__tests__/XMLHttpRequest-test.js index aca4b6b7d..eba667d4b 100644 --- a/Libraries/Network/__tests__/XMLHttpRequest-test.js +++ b/Libraries/Network/__tests__/XMLHttpRequest-test.js @@ -20,7 +20,6 @@ function setRequestId(id){ } jest - .disableAutomock() .dontMock('event-target-shim') .setMock('NativeModules', { Networking: { diff --git a/Libraries/StyleSheet/__tests__/flattenStyle-test.js b/Libraries/StyleSheet/__tests__/flattenStyle-test.js index 2fb14d130..de6177f99 100644 --- a/Libraries/StyleSheet/__tests__/flattenStyle-test.js +++ b/Libraries/StyleSheet/__tests__/flattenStyle-test.js @@ -8,8 +8,6 @@ */ 'use strict'; -jest.disableAutomock(); - var flattenStyle = require('flattenStyle'); describe('flattenStyle', () => { diff --git a/Libraries/StyleSheet/__tests__/normalizeColor-test.js b/Libraries/StyleSheet/__tests__/normalizeColor-test.js index 8db615a44..bf7a285f7 100644 --- a/Libraries/StyleSheet/__tests__/normalizeColor-test.js +++ b/Libraries/StyleSheet/__tests__/normalizeColor-test.js @@ -8,8 +8,6 @@ */ 'use strict'; -jest.disableAutomock(); - var normalizeColor = require('normalizeColor'); describe('normalizeColor', function() { diff --git a/Libraries/StyleSheet/__tests__/processColor-test.js b/Libraries/StyleSheet/__tests__/processColor-test.js index b36120c9c..f26d5d6e3 100644 --- a/Libraries/StyleSheet/__tests__/processColor-test.js +++ b/Libraries/StyleSheet/__tests__/processColor-test.js @@ -8,8 +8,6 @@ */ 'use strict'; -jest.disableAutomock(); - const {OS} = require('Platform'); const processColor = require('processColor'); diff --git a/Libraries/StyleSheet/__tests__/processTransform-test.js b/Libraries/StyleSheet/__tests__/processTransform-test.js index ac5cde1cc..3f4eaacdb 100644 --- a/Libraries/StyleSheet/__tests__/processTransform-test.js +++ b/Libraries/StyleSheet/__tests__/processTransform-test.js @@ -8,8 +8,6 @@ */ 'use strict'; -jest.disableAutomock(); - const processTransform = require('processTransform'); describe('processTransform', () => { diff --git a/Libraries/StyleSheet/__tests__/setNormalizedColorAlpha-test.js b/Libraries/StyleSheet/__tests__/setNormalizedColorAlpha-test.js index c8d90b71e..c2f586b44 100644 --- a/Libraries/StyleSheet/__tests__/setNormalizedColorAlpha-test.js +++ b/Libraries/StyleSheet/__tests__/setNormalizedColorAlpha-test.js @@ -8,8 +8,6 @@ */ 'use strict'; -jest.disableAutomock(); - var setNormalizedColorAlpha = require('setNormalizedColorAlpha'); var normalizeColor = require('normalizeColor'); diff --git a/Libraries/Utilities/__tests__/MatrixMath-test.js b/Libraries/Utilities/__tests__/MatrixMath-test.js index 14cca94de..ac60859ef 100644 --- a/Libraries/Utilities/__tests__/MatrixMath-test.js +++ b/Libraries/Utilities/__tests__/MatrixMath-test.js @@ -8,8 +8,6 @@ */ 'use strict'; -jest.disableAutomock(); - var MatrixMath = require('MatrixMath'); function degreesToRadians(degrees) { diff --git a/Libraries/Utilities/__tests__/Platform-test.js b/Libraries/Utilities/__tests__/Platform-test.js index ffa3a1b08..419d83f45 100644 --- a/Libraries/Utilities/__tests__/Platform-test.js +++ b/Libraries/Utilities/__tests__/Platform-test.js @@ -8,8 +8,6 @@ */ 'use strict'; -jest.disableAutomock(); - var PlatformIOS = require('../Platform.ios'); var PlatformAndroid = require('../Platform.android'); diff --git a/Libraries/Utilities/__tests__/SceneTracker-test.js b/Libraries/Utilities/__tests__/SceneTracker-test.js index 73e384adb..345b60f5e 100644 --- a/Libraries/Utilities/__tests__/SceneTracker-test.js +++ b/Libraries/Utilities/__tests__/SceneTracker-test.js @@ -9,8 +9,6 @@ */ 'use strict'; -jest.disableAutomock(); - const SceneTracker = require('SceneTracker'); describe('setActiveScene', function() { diff --git a/Libraries/Utilities/__tests__/buildStyleInterpolator-test.js b/Libraries/Utilities/__tests__/buildStyleInterpolator-test.js index add38b327..c919e314d 100644 --- a/Libraries/Utilities/__tests__/buildStyleInterpolator-test.js +++ b/Libraries/Utilities/__tests__/buildStyleInterpolator-test.js @@ -9,8 +9,6 @@ */ 'use strict'; -jest.disableAutomock(); - var buildStyleInterpolator = require('buildStyleInterpolator'); var validateEmpty = function(interpolator, value, validator) { diff --git a/Libraries/Utilities/__tests__/deepFreezeAndThrowOnMutationInDev-test.js b/Libraries/Utilities/__tests__/deepFreezeAndThrowOnMutationInDev-test.js index e634d3949..b8f5a33db 100644 --- a/Libraries/Utilities/__tests__/deepFreezeAndThrowOnMutationInDev-test.js +++ b/Libraries/Utilities/__tests__/deepFreezeAndThrowOnMutationInDev-test.js @@ -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() { diff --git a/Libraries/Utilities/__tests__/groupByEveryN-test.js b/Libraries/Utilities/__tests__/groupByEveryN-test.js index 4fb93a38c..c1b54b40e 100644 --- a/Libraries/Utilities/__tests__/groupByEveryN-test.js +++ b/Libraries/Utilities/__tests__/groupByEveryN-test.js @@ -9,8 +9,6 @@ */ 'use strict'; -jest.disableAutomock(); - describe('groupByEveryN', () => { var groupByEveryN = require('groupByEveryN'); diff --git a/Libraries/Utilities/__tests__/mapWithSeparator-test.js b/Libraries/Utilities/__tests__/mapWithSeparator-test.js index 54fc5e832..0d4180d4e 100644 --- a/Libraries/Utilities/__tests__/mapWithSeparator-test.js +++ b/Libraries/Utilities/__tests__/mapWithSeparator-test.js @@ -8,8 +8,6 @@ */ 'use strict'; -jest.disableAutomock(); - describe('mapWithSeparator', () => { const mapWithSeparator = require('mapWithSeparator'); diff --git a/Libraries/Utilities/__tests__/truncate-test.js b/Libraries/Utilities/__tests__/truncate-test.js index 9cf3de653..5e0598d16 100644 --- a/Libraries/Utilities/__tests__/truncate-test.js +++ b/Libraries/Utilities/__tests__/truncate-test.js @@ -9,8 +9,6 @@ */ 'use strict'; -jest.disableAutomock(); - describe('truncate', () => { var truncate = require('truncate'); diff --git a/Libraries/Utilities/__tests__/utf8-test.js b/Libraries/Utilities/__tests__/utf8-test.js index ec91f0205..eaecd354a 100644 --- a/Libraries/Utilities/__tests__/utf8-test.js +++ b/Libraries/Utilities/__tests__/utf8-test.js @@ -7,57 +7,55 @@ * of patent rights can be found in the PATENTS file in the same directory. */ - 'use strict'; +'use strict'; - jest.disableAutomock(); +const {encode} = require('../utf8'); - const {encode} = require('../utf8'); +describe('UTF-8 encoding:', () => { + it('can encode code points < U+80', () => { + const arrayBuffer = encode('\u0000abcDEF\u007f'); + expect(new Uint8Array(arrayBuffer)).toEqual( + new Uint8Array([0x00, 0x61, 0x62, 0x63, 0x44, 0x45, 0x46, 0x7f])); + }); - describe('UTF-8 encoding:', () => { - it('can encode code points < U+80', () => { - const arrayBuffer = encode('\u0000abcDEF\u007f'); - expect(new Uint8Array(arrayBuffer)).toEqual( - new Uint8Array([0x00, 0x61, 0x62, 0x63, 0x44, 0x45, 0x46, 0x7f])); - }); + it('can encode code points < U+800', () => { + const arrayBuffer = encode('\u0080\u0548\u07ff'); + expect(new Uint8Array(arrayBuffer)).toEqual( + new Uint8Array([0xc2, 0x80, 0xd5, 0x88, 0xdf, 0xbf])); + }); - it('can encode code points < U+800', () => { - const arrayBuffer = encode('\u0080\u0548\u07ff'); - expect(new Uint8Array(arrayBuffer)).toEqual( - new Uint8Array([0xc2, 0x80, 0xd5, 0x88, 0xdf, 0xbf])); - }); + it('can encode code points < U+10000', () => { + const arrayBuffer = encode('\u0800\uac48\uffff'); + expect(new Uint8Array(arrayBuffer)).toEqual( + new Uint8Array([0xe0, 0xa0, 0x80, 0xea, 0xb1, 0x88, 0xef, 0xbf, 0xbf])); + }); - it('can encode code points < U+10000', () => { - const arrayBuffer = encode('\u0800\uac48\uffff'); - expect(new Uint8Array(arrayBuffer)).toEqual( - new Uint8Array([0xe0, 0xa0, 0x80, 0xea, 0xb1, 0x88, 0xef, 0xbf, 0xbf])); - }); + it('can encode code points in the Supplementary Planes (surrogate pairs)', () => { + const arrayBuffer = encode([ + '\ud800\udc00', + '\ud800\ude89', + '\ud83d\ude3b', + '\udbff\udfff' + ].join('')); + expect(new Uint8Array(arrayBuffer)).toEqual( + new Uint8Array([ + 0xf0, 0x90, 0x80, 0x80, + 0xf0, 0x90, 0x8a, 0x89, + 0xf0, 0x9f, 0x98, 0xbb, + 0xf4, 0x8f, 0xbf, 0xbf, + ]) + ); + }); - it('can encode code points in the Supplementary Planes (surrogate pairs)', () => { - const arrayBuffer = encode([ - '\ud800\udc00', - '\ud800\ude89', - '\ud83d\ude3b', - '\udbff\udfff' - ].join('')); - expect(new Uint8Array(arrayBuffer)).toEqual( - new Uint8Array([ - 0xf0, 0x90, 0x80, 0x80, - 0xf0, 0x90, 0x8a, 0x89, - 0xf0, 0x9f, 0x98, 0xbb, - 0xf4, 0x8f, 0xbf, 0xbf, - ]) - ); - }); + it('allows for stray high surrogates', () => { + const arrayBuffer = encode(String.fromCharCode(0x61, 0xd8c6, 0x62)); + expect(new Uint8Array(arrayBuffer)).toEqual( + new Uint8Array([0x61, 0xed, 0xa3, 0x86, 0x62])); + }); - it('allows for stray high surrogates', () => { - const arrayBuffer = encode(String.fromCharCode(0x61, 0xd8c6, 0x62)); - expect(new Uint8Array(arrayBuffer)).toEqual( - new Uint8Array([0x61, 0xed, 0xa3, 0x86, 0x62])); - }); - - it('allows for stray low surrogates', () => { - const arrayBuffer = encode(String.fromCharCode(0x61, 0xde19, 0x62)); - expect(new Uint8Array(arrayBuffer)).toEqual( - new Uint8Array([0x61, 0xed, 0xb8, 0x99, 0x62])); - }); - }); + it('allows for stray low surrogates', () => { + const arrayBuffer = encode(String.fromCharCode(0x61, 0xde19, 0x62)); + expect(new Uint8Array(arrayBuffer)).toEqual( + new Uint8Array([0x61, 0xed, 0xb8, 0x99, 0x62])); + }); +}); diff --git a/Libraries/Utilities/differ/__tests__/deepDiffer-test.js b/Libraries/Utilities/differ/__tests__/deepDiffer-test.js index 847efc212..1337521e6 100644 --- a/Libraries/Utilities/differ/__tests__/deepDiffer-test.js +++ b/Libraries/Utilities/differ/__tests__/deepDiffer-test.js @@ -8,7 +8,6 @@ */ 'use strict'; -jest.disableAutomock(); var deepDiffer = require('deepDiffer'); describe('deepDiffer', function() { diff --git a/local-cli/bundle/__tests__/filterPlatformAssetScales-test.js b/local-cli/bundle/__tests__/filterPlatformAssetScales-test.js index 092046020..1db781c23 100644 --- a/local-cli/bundle/__tests__/filterPlatformAssetScales-test.js +++ b/local-cli/bundle/__tests__/filterPlatformAssetScales-test.js @@ -8,7 +8,7 @@ */ 'use strict'; -jest.disableAutomock() +jest .dontMock('../filterPlatformAssetScales') .dontMock('../assetPathUtils'); diff --git a/local-cli/bundle/__tests__/getAssetDestPathAndroid-test.js b/local-cli/bundle/__tests__/getAssetDestPathAndroid-test.js index b0ffaa194..3f5829954 100644 --- a/local-cli/bundle/__tests__/getAssetDestPathAndroid-test.js +++ b/local-cli/bundle/__tests__/getAssetDestPathAndroid-test.js @@ -8,7 +8,7 @@ */ 'use strict'; -jest.disableAutomock() +jest .dontMock('../getAssetDestPathAndroid') .dontMock('../assetPathUtils'); diff --git a/local-cli/bundle/__tests__/getAssetDestPathIOS-test.js b/local-cli/bundle/__tests__/getAssetDestPathIOS-test.js index fdfd6ae96..d30441b48 100644 --- a/local-cli/bundle/__tests__/getAssetDestPathIOS-test.js +++ b/local-cli/bundle/__tests__/getAssetDestPathIOS-test.js @@ -8,7 +8,7 @@ */ 'use strict'; -jest.disableAutomock().dontMock('../getAssetDestPathIOS'); +jest.dontMock('../getAssetDestPathIOS'); const getAssetDestPathIOS = require('../getAssetDestPathIOS'); diff --git a/local-cli/core/__tests__/android/findAndroidAppFolder.spec.js b/local-cli/core/__tests__/android/findAndroidAppFolder.spec.js index 362207630..630809f06 100644 --- a/local-cli/core/__tests__/android/findAndroidAppFolder.spec.js +++ b/local-cli/core/__tests__/android/findAndroidAppFolder.spec.js @@ -11,8 +11,6 @@ 'use strict'; -jest.autoMockOff(); - const findAndroidAppFolder = require('../../android/findAndroidAppFolder'); const mockFS = require('mock-fs'); const mocks = require('../../__fixtures__/android'); diff --git a/local-cli/core/__tests__/android/findManifest.spec.js b/local-cli/core/__tests__/android/findManifest.spec.js index ed835d043..9bc683fd7 100644 --- a/local-cli/core/__tests__/android/findManifest.spec.js +++ b/local-cli/core/__tests__/android/findManifest.spec.js @@ -11,8 +11,6 @@ 'use strict'; -jest.autoMockOff(); - require('../../__fixtures__/mockFSWorkaround'); const findManifest = require('../../android/findManifest'); diff --git a/local-cli/core/__tests__/android/findPackageClassName.spec.js b/local-cli/core/__tests__/android/findPackageClassName.spec.js index 07ad68602..234a93a5f 100644 --- a/local-cli/core/__tests__/android/findPackageClassName.spec.js +++ b/local-cli/core/__tests__/android/findPackageClassName.spec.js @@ -11,8 +11,6 @@ 'use strict'; -jest.autoMockOff(); - require('../../__fixtures__/mockFSWorkaround'); const findPackageClassName = require('../../android/findPackageClassName'); diff --git a/local-cli/core/__tests__/android/getDependencyConfig.spec.js b/local-cli/core/__tests__/android/getDependencyConfig.spec.js index 7ed9867c7..d44c0bfc5 100644 --- a/local-cli/core/__tests__/android/getDependencyConfig.spec.js +++ b/local-cli/core/__tests__/android/getDependencyConfig.spec.js @@ -11,8 +11,6 @@ 'use strict'; -jest.autoMockOff(); - require('../../__fixtures__/mockFSWorkaround'); const getDependencyConfig = require('../../android').dependencyConfig; diff --git a/local-cli/core/__tests__/android/getProjectConfig.spec.js b/local-cli/core/__tests__/android/getProjectConfig.spec.js index 576d9bc93..e025a11c7 100644 --- a/local-cli/core/__tests__/android/getProjectConfig.spec.js +++ b/local-cli/core/__tests__/android/getProjectConfig.spec.js @@ -11,8 +11,6 @@ 'use strict'; -jest.autoMockOff(); - require('../../__fixtures__/mockFSWorkaround'); const getProjectConfig = require('../../android').projectConfig; diff --git a/local-cli/core/__tests__/android/readManifest.spec.js b/local-cli/core/__tests__/android/readManifest.spec.js index 611660f96..01e655898 100644 --- a/local-cli/core/__tests__/android/readManifest.spec.js +++ b/local-cli/core/__tests__/android/readManifest.spec.js @@ -11,8 +11,6 @@ 'use strict'; -jest.autoMockOff(); - require('../../__fixtures__/mockFSWorkaround'); const findManifest = require('../../android/findManifest'); diff --git a/local-cli/core/__tests__/findAssets.spec.js b/local-cli/core/__tests__/findAssets.spec.js index af3c1c9d9..484d0c09b 100644 --- a/local-cli/core/__tests__/findAssets.spec.js +++ b/local-cli/core/__tests__/findAssets.spec.js @@ -11,8 +11,6 @@ 'use strict'; -jest.autoMockOff(); - const findAssets = require('../findAssets'); const dependencies = require('../__fixtures__/dependencies'); const mockFs = require('mock-fs'); diff --git a/local-cli/core/__tests__/findPlugins.spec.js b/local-cli/core/__tests__/findPlugins.spec.js index 94cc5d01f..e13e074ca 100644 --- a/local-cli/core/__tests__/findPlugins.spec.js +++ b/local-cli/core/__tests__/findPlugins.spec.js @@ -11,8 +11,6 @@ 'use strict'; -jest.autoMockOff(); - const findPlugins = require('../findPlugins'); const path = require('path'); diff --git a/local-cli/core/__tests__/ios/findProject.spec.js b/local-cli/core/__tests__/ios/findProject.spec.js index f8532936e..2e4067116 100644 --- a/local-cli/core/__tests__/ios/findProject.spec.js +++ b/local-cli/core/__tests__/ios/findProject.spec.js @@ -11,8 +11,6 @@ 'use strict'; -jest.autoMockOff(); - require('../../__fixtures__/mockFSWorkaround'); const findProject = require('../../ios/findProject'); diff --git a/local-cli/core/__tests__/ios/getProjectConfig.spec.js b/local-cli/core/__tests__/ios/getProjectConfig.spec.js index 762b0be12..e6d2eb900 100644 --- a/local-cli/core/__tests__/ios/getProjectConfig.spec.js +++ b/local-cli/core/__tests__/ios/getProjectConfig.spec.js @@ -11,8 +11,6 @@ 'use strict'; -jest.autoMockOff(); - require('../../__fixtures__/mockFSWorkaround'); const getProjectConfig = require('../../ios').projectConfig; diff --git a/local-cli/core/__tests__/makeCommand.spec.js b/local-cli/core/__tests__/makeCommand.spec.js index f68754d67..212760a3f 100644 --- a/local-cli/core/__tests__/makeCommand.spec.js +++ b/local-cli/core/__tests__/makeCommand.spec.js @@ -11,8 +11,6 @@ 'use strict'; -jest.autoMockOff(); - let spawnError = false; jest.setMock('child_process', { diff --git a/local-cli/link/__tests__/android/applyPatch.spec.js b/local-cli/link/__tests__/android/applyPatch.spec.js index 19ce76b4b..989fd639b 100644 --- a/local-cli/link/__tests__/android/applyPatch.spec.js +++ b/local-cli/link/__tests__/android/applyPatch.spec.js @@ -9,8 +9,6 @@ 'use strict'; -jest.autoMockOff(); - const applyParams = require('../../android/patches/applyParams'); describe('applyParams', () => { diff --git a/local-cli/link/__tests__/android/isInstalled.spec.js b/local-cli/link/__tests__/android/isInstalled.spec.js index 767925d11..c85717133 100644 --- a/local-cli/link/__tests__/android/isInstalled.spec.js +++ b/local-cli/link/__tests__/android/isInstalled.spec.js @@ -1,7 +1,5 @@ 'use strict'; -jest.autoMockOff(); - const path = require('path'); const isInstalled = require('../../android/isInstalled'); diff --git a/local-cli/link/__tests__/android/makeBuildPatch.spec.js b/local-cli/link/__tests__/android/makeBuildPatch.spec.js index 7a8745df5..1e3c3dcbb 100644 --- a/local-cli/link/__tests__/android/makeBuildPatch.spec.js +++ b/local-cli/link/__tests__/android/makeBuildPatch.spec.js @@ -1,7 +1,5 @@ 'use strict'; -jest.autoMockOff(); - const makeBuildPatch = require('../../android/patches/makeBuildPatch'); const name = 'test'; diff --git a/local-cli/link/__tests__/android/makeImportPatch.spec.js b/local-cli/link/__tests__/android/makeImportPatch.spec.js index d8a6020cf..213d0cad1 100644 --- a/local-cli/link/__tests__/android/makeImportPatch.spec.js +++ b/local-cli/link/__tests__/android/makeImportPatch.spec.js @@ -1,7 +1,5 @@ 'use strict'; -jest.autoMockOff(); - const makeImportPatch = require('../../android/patches/makeImportPatch'); const packageImportPath = 'import some.example.project'; diff --git a/local-cli/link/__tests__/android/makePackagePatch.spec.js b/local-cli/link/__tests__/android/makePackagePatch.spec.js index 16b5a86b9..258de7b83 100644 --- a/local-cli/link/__tests__/android/makePackagePatch.spec.js +++ b/local-cli/link/__tests__/android/makePackagePatch.spec.js @@ -1,7 +1,5 @@ 'use strict'; -jest.autoMockOff(); - const makePackagePatch = require('../../android/patches/makePackagePatch'); const applyParams = require('../../android/patches/applyParams'); diff --git a/local-cli/link/__tests__/android/makeSettingsPatch.spec.js b/local-cli/link/__tests__/android/makeSettingsPatch.spec.js index 55153e75d..bd45e28de 100644 --- a/local-cli/link/__tests__/android/makeSettingsPatch.spec.js +++ b/local-cli/link/__tests__/android/makeSettingsPatch.spec.js @@ -1,7 +1,5 @@ 'use strict'; -jest.autoMockOff(); - const path = require('path'); const makeSettingsPatch = require('../../android/patches/makeSettingsPatch'); diff --git a/local-cli/link/__tests__/android/makeStringsPatch.spec.js b/local-cli/link/__tests__/android/makeStringsPatch.spec.js index b954e263a..da0036208 100644 --- a/local-cli/link/__tests__/android/makeStringsPatch.spec.js +++ b/local-cli/link/__tests__/android/makeStringsPatch.spec.js @@ -1,7 +1,5 @@ 'use strict'; -jest.autoMockOff(); - const makeStringsPatch = require('../../android/patches/makeStringsPatch'); describe('makeStringsPatch', () => { diff --git a/local-cli/link/__tests__/getDependencyConfig.spec.js b/local-cli/link/__tests__/getDependencyConfig.spec.js index 48ee731e4..2183859cd 100644 --- a/local-cli/link/__tests__/getDependencyConfig.spec.js +++ b/local-cli/link/__tests__/getDependencyConfig.spec.js @@ -1,7 +1,5 @@ 'use strict'; -jest.autoMockOff(); - const getDependencyConfig = require('../getDependencyConfig'); const sinon = require('sinon'); diff --git a/local-cli/link/__tests__/getProjectDependencies.spec.js b/local-cli/link/__tests__/getProjectDependencies.spec.js index a5763e0e9..84ef4a08c 100644 --- a/local-cli/link/__tests__/getProjectDependencies.spec.js +++ b/local-cli/link/__tests__/getProjectDependencies.spec.js @@ -9,8 +9,6 @@ 'use strict'; -jest.autoMockOff(); - const getProjectDependencies = require('../getProjectDependencies'); const path = require('path'); diff --git a/local-cli/link/__tests__/groupFilesByType.spec.js b/local-cli/link/__tests__/groupFilesByType.spec.js index 304ee8ec1..333947633 100644 --- a/local-cli/link/__tests__/groupFilesByType.spec.js +++ b/local-cli/link/__tests__/groupFilesByType.spec.js @@ -1,7 +1,5 @@ 'use strict'; -jest.autoMockOff(); - const groupFilesByType = require('../groupFilesByType'); describe('groupFilesByType', () => { diff --git a/local-cli/link/__tests__/ios/addFileToProject.spec.js b/local-cli/link/__tests__/ios/addFileToProject.spec.js index d1a5a75a6..db401c111 100644 --- a/local-cli/link/__tests__/ios/addFileToProject.spec.js +++ b/local-cli/link/__tests__/ios/addFileToProject.spec.js @@ -1,7 +1,5 @@ 'use strict'; -jest.autoMockOff(); - const xcode = require('xcode'); const path = require('path'); const addFileToProject = require('../../ios/addFileToProject'); diff --git a/local-cli/link/__tests__/ios/addProjectToLibraries.spec.js b/local-cli/link/__tests__/ios/addProjectToLibraries.spec.js index ebcdb411b..377a69b53 100644 --- a/local-cli/link/__tests__/ios/addProjectToLibraries.spec.js +++ b/local-cli/link/__tests__/ios/addProjectToLibraries.spec.js @@ -1,7 +1,5 @@ 'use strict'; -jest.autoMockOff(); - const xcode = require('xcode'); const path = require('path'); const PbxFile = require('xcode/lib/pbxFile'); diff --git a/local-cli/link/__tests__/ios/addSharedLibraries.spec.js b/local-cli/link/__tests__/ios/addSharedLibraries.spec.js index daecdd914..0caad186e 100644 --- a/local-cli/link/__tests__/ios/addSharedLibraries.spec.js +++ b/local-cli/link/__tests__/ios/addSharedLibraries.spec.js @@ -1,7 +1,5 @@ 'use strict'; -jest.autoMockOff(); - const xcode = require('xcode'); const path = require('path'); const addSharedLibraries = require('../../ios/addSharedLibraries'); diff --git a/local-cli/link/__tests__/ios/createGroup.spec.js b/local-cli/link/__tests__/ios/createGroup.spec.js index 037c866e6..2363353fc 100644 --- a/local-cli/link/__tests__/ios/createGroup.spec.js +++ b/local-cli/link/__tests__/ios/createGroup.spec.js @@ -1,7 +1,5 @@ 'use strict'; -jest.autoMockOff(); - const xcode = require('xcode'); const path = require('path'); const createGroup = require('../../ios/createGroup'); diff --git a/local-cli/link/__tests__/ios/getBuildProperty.spec.js b/local-cli/link/__tests__/ios/getBuildProperty.spec.js index 1b45b9658..bea766ed1 100644 --- a/local-cli/link/__tests__/ios/getBuildProperty.spec.js +++ b/local-cli/link/__tests__/ios/getBuildProperty.spec.js @@ -1,7 +1,5 @@ 'use strict'; -jest.autoMockOff(); - const xcode = require('xcode'); const path = require('path'); const getBuildProperty = require('../../ios/getBuildProperty'); diff --git a/local-cli/link/__tests__/ios/getGroup.spec.js b/local-cli/link/__tests__/ios/getGroup.spec.js index 21e1ec5af..731a06b85 100644 --- a/local-cli/link/__tests__/ios/getGroup.spec.js +++ b/local-cli/link/__tests__/ios/getGroup.spec.js @@ -1,7 +1,5 @@ 'use strict'; -jest.autoMockOff(); - const xcode = require('xcode'); const getGroup = require('../../ios/getGroup'); const path = require('path'); diff --git a/local-cli/link/__tests__/ios/getHeaderSearchPath.spec.js b/local-cli/link/__tests__/ios/getHeaderSearchPath.spec.js index 142d387c4..d854413a7 100644 --- a/local-cli/link/__tests__/ios/getHeaderSearchPath.spec.js +++ b/local-cli/link/__tests__/ios/getHeaderSearchPath.spec.js @@ -1,7 +1,5 @@ 'use strict'; -jest.autoMockOff(); - const getHeaderSearchPath = require('../../ios/getHeaderSearchPath'); const path = require('path'); diff --git a/local-cli/link/__tests__/ios/getHeadersInFolder.spec.js b/local-cli/link/__tests__/ios/getHeadersInFolder.spec.js index 30363d687..a529a485d 100644 --- a/local-cli/link/__tests__/ios/getHeadersInFolder.spec.js +++ b/local-cli/link/__tests__/ios/getHeadersInFolder.spec.js @@ -1,7 +1,5 @@ 'use strict'; -jest.autoMockOff(); - const getHeadersInFolder = require('../../ios/getHeadersInFolder'); describe('ios::getHeadersInFolder', () => { diff --git a/local-cli/link/__tests__/ios/getPlist.spec.js b/local-cli/link/__tests__/ios/getPlist.spec.js index 2c7921d4b..d86a8f19a 100644 --- a/local-cli/link/__tests__/ios/getPlist.spec.js +++ b/local-cli/link/__tests__/ios/getPlist.spec.js @@ -1,7 +1,5 @@ 'use strict'; -jest.autoMockOff(); - const xcode = require('xcode'); const getPlist = require('../../ios/getPlist'); const path = require('path'); diff --git a/local-cli/link/__tests__/ios/getPlistPath.spec.js b/local-cli/link/__tests__/ios/getPlistPath.spec.js index e5cd111bf..32fb9a228 100644 --- a/local-cli/link/__tests__/ios/getPlistPath.spec.js +++ b/local-cli/link/__tests__/ios/getPlistPath.spec.js @@ -1,7 +1,5 @@ 'use strict'; -jest.autoMockOff(); - const xcode = require('xcode'); const getPlistPath = require('../../ios/getPlistPath'); const path = require('path'); diff --git a/local-cli/link/__tests__/ios/getProducts.spec.js b/local-cli/link/__tests__/ios/getProducts.spec.js index 6d22fac85..4b0bab981 100644 --- a/local-cli/link/__tests__/ios/getProducts.spec.js +++ b/local-cli/link/__tests__/ios/getProducts.spec.js @@ -1,7 +1,5 @@ 'use strict'; -jest.autoMockOff(); - const xcode = require('xcode'); const getProducts = require('../../ios/getProducts'); const path = require('path'); diff --git a/local-cli/link/__tests__/ios/hasLibraryImported.spec.js b/local-cli/link/__tests__/ios/hasLibraryImported.spec.js index 2b3ac8f23..0877edde7 100644 --- a/local-cli/link/__tests__/ios/hasLibraryImported.spec.js +++ b/local-cli/link/__tests__/ios/hasLibraryImported.spec.js @@ -1,7 +1,5 @@ 'use strict'; -jest.autoMockOff(); - const xcode = require('xcode'); const hasLibraryImported = require('../../ios/hasLibraryImported'); const path = require('path'); diff --git a/local-cli/link/__tests__/ios/isInstalled.spec.js b/local-cli/link/__tests__/ios/isInstalled.spec.js index 2a696fd1a..53412c38c 100644 --- a/local-cli/link/__tests__/ios/isInstalled.spec.js +++ b/local-cli/link/__tests__/ios/isInstalled.spec.js @@ -1,7 +1,5 @@ 'use strict'; -jest.autoMockOff(); - const path = require('path'); const isInstalled = require('../../ios/isInstalled'); diff --git a/local-cli/link/__tests__/ios/mapHeaderSearchPaths.spec.js b/local-cli/link/__tests__/ios/mapHeaderSearchPaths.spec.js index b3011b083..87f10bac0 100644 --- a/local-cli/link/__tests__/ios/mapHeaderSearchPaths.spec.js +++ b/local-cli/link/__tests__/ios/mapHeaderSearchPaths.spec.js @@ -1,7 +1,5 @@ 'use strict'; -jest.autoMockOff(); - const xcode = require('xcode'); const mapHeaderSearchPaths = require('../../ios/mapHeaderSearchPaths'); const path = require('path'); diff --git a/local-cli/link/__tests__/ios/removeProjectFromLibraries.js b/local-cli/link/__tests__/ios/removeProjectFromLibraries.js index b40464ff7..018c7981f 100644 --- a/local-cli/link/__tests__/ios/removeProjectFromLibraries.js +++ b/local-cli/link/__tests__/ios/removeProjectFromLibraries.js @@ -1,7 +1,5 @@ 'use strict'; -jest.autoMockOff(); - const xcode = require('xcode'); const PbxFile = require('xcode/lib/pbxFile'); const addProjectToLibraries = require('../../ios/addProjectToLibraries'); diff --git a/local-cli/link/__tests__/ios/removeProjectFromProject.spec.js b/local-cli/link/__tests__/ios/removeProjectFromProject.spec.js index 7da0bb16c..8f4375326 100644 --- a/local-cli/link/__tests__/ios/removeProjectFromProject.spec.js +++ b/local-cli/link/__tests__/ios/removeProjectFromProject.spec.js @@ -1,7 +1,5 @@ 'use strict'; -jest.autoMockOff(); - const xcode = require('xcode'); const pbxFile = require('xcode/lib/pbxFile'); const addFileToProject = require('../../ios/addFileToProject'); diff --git a/local-cli/link/__tests__/ios/removeSharedLibrary.spec.js b/local-cli/link/__tests__/ios/removeSharedLibrary.spec.js index 408dbb22a..22672e079 100644 --- a/local-cli/link/__tests__/ios/removeSharedLibrary.spec.js +++ b/local-cli/link/__tests__/ios/removeSharedLibrary.spec.js @@ -1,7 +1,5 @@ 'use strict'; -jest.autoMockOff(); - const xcode = require('xcode'); const path = require('path'); const addSharedLibraries = require('../../ios/addSharedLibraries'); diff --git a/local-cli/link/__tests__/ios/writePlist.spec.js b/local-cli/link/__tests__/ios/writePlist.spec.js index d95ee511e..95925ff8b 100644 --- a/local-cli/link/__tests__/ios/writePlist.spec.js +++ b/local-cli/link/__tests__/ios/writePlist.spec.js @@ -9,7 +9,6 @@ 'use strict'; -jest.autoMockOff(); jest.mock('fs'); let plistPath = null; diff --git a/local-cli/link/__tests__/link.spec.js b/local-cli/link/__tests__/link.spec.js index 4e34a1b63..92239e7fc 100644 --- a/local-cli/link/__tests__/link.spec.js +++ b/local-cli/link/__tests__/link.spec.js @@ -9,8 +9,6 @@ 'use strict'; -jest.autoMockOff(); - const sinon = require('sinon'); const log = require('npmlog'); const path = require('path'); diff --git a/local-cli/link/__tests__/promiseWaterfall.spec.js b/local-cli/link/__tests__/promiseWaterfall.spec.js index 7b592bf34..fef3a9e8b 100644 --- a/local-cli/link/__tests__/promiseWaterfall.spec.js +++ b/local-cli/link/__tests__/promiseWaterfall.spec.js @@ -1,7 +1,5 @@ 'use strict'; -jest.autoMockOff(); - const sinon = require('sinon'); const promiseWaterfall = require('../promiseWaterfall'); diff --git a/local-cli/runIOS/__tests__/findMatchingSimulator-test.js b/local-cli/runIOS/__tests__/findMatchingSimulator-test.js index 31fa4dbbd..957f80cf6 100644 --- a/local-cli/runIOS/__tests__/findMatchingSimulator-test.js +++ b/local-cli/runIOS/__tests__/findMatchingSimulator-test.js @@ -9,7 +9,7 @@ */ 'use strict'; -jest.disableAutomock().dontMock('../findMatchingSimulator'); +jest.dontMock('../findMatchingSimulator'); const findMatchingSimulator = require('../findMatchingSimulator'); diff --git a/local-cli/runIOS/__tests__/findXcodeProject-test.js b/local-cli/runIOS/__tests__/findXcodeProject-test.js index 295386a0d..d0e3832be 100644 --- a/local-cli/runIOS/__tests__/findXcodeProject-test.js +++ b/local-cli/runIOS/__tests__/findXcodeProject-test.js @@ -8,7 +8,7 @@ */ 'use strict'; -jest.disableAutomock().dontMock('../findXcodeProject'); +jest.dontMock('../findXcodeProject'); const findXcodeProject = require('../findXcodeProject'); diff --git a/local-cli/runIOS/__tests__/parseIOSDevicesList-test.js b/local-cli/runIOS/__tests__/parseIOSDevicesList-test.js index 4f3540367..82071cd3d 100644 --- a/local-cli/runIOS/__tests__/parseIOSDevicesList-test.js +++ b/local-cli/runIOS/__tests__/parseIOSDevicesList-test.js @@ -9,7 +9,7 @@ 'use strict'; -jest.disableAutomock().dontMock('../parseIOSDevicesList'); +jest.dontMock('../parseIOSDevicesList'); var parseIOSDevicesList = require('../parseIOSDevicesList'); describe('parseIOSDevicesList', () => { diff --git a/local-cli/server/util/__tests__/getInverseDependencies-test.js b/local-cli/server/util/__tests__/getInverseDependencies-test.js index 061e35e6e..dafaa9e16 100644 --- a/local-cli/server/util/__tests__/getInverseDependencies-test.js +++ b/local-cli/server/util/__tests__/getInverseDependencies-test.js @@ -8,7 +8,7 @@ */ 'use strict'; -jest.disableAutomock().dontMock('../getInverseDependencies'); +jest.dontMock('../getInverseDependencies'); const getInverseDependencies = require('../getInverseDependencies'); diff --git a/local-cli/templates/HelloWorld/__tests__/index.android.js b/local-cli/templates/HelloWorld/__tests__/index.android.js index d5fd11aa0..b49b9087f 100644 --- a/local-cli/templates/HelloWorld/__tests__/index.android.js +++ b/local-cli/templates/HelloWorld/__tests__/index.android.js @@ -1,4 +1,3 @@ -jest.disableAutomock(); import 'react-native'; import React from 'react'; import Index from '../index.android.js'; diff --git a/local-cli/templates/HelloWorld/__tests__/index.ios.js b/local-cli/templates/HelloWorld/__tests__/index.ios.js index 4d2e20757..ba7c5b5e1 100644 --- a/local-cli/templates/HelloWorld/__tests__/index.ios.js +++ b/local-cli/templates/HelloWorld/__tests__/index.ios.js @@ -1,4 +1,3 @@ -jest.disableAutomock(); import 'react-native'; import React from 'react'; import Index from '../index.ios.js'; diff --git a/website/jsdocs/__tests__/jsdocs-test.js b/website/jsdocs/__tests__/jsdocs-test.js index 3e69f93f5..bb9072df7 100644 --- a/website/jsdocs/__tests__/jsdocs-test.js +++ b/website/jsdocs/__tests__/jsdocs-test.js @@ -8,7 +8,6 @@ * */ 'use strict'; -jest.disableAutomock(); const fs = require('fs'); const path = require('path');