Fix #18279: Add 'addNetworkingHandler' to jest mock setup

Summary:
Fixes #18279 by adding the correct methods to the jest mocks setup file.

Test by no longer including the workarounds in [issue comments](https://github.com/facebook/react-native/issues/18279#issuecomment-374177940). A [comment from hramos](https://github.com/facebook/react-native/issues/18279#issuecomment-371914037) mentioned improving the test coverage as well, but I wasn't certain how to achieve that.

[GENERAL] [BUGFIX] [BlobManager] - Fixed the jest mocks to avoid breaking tests
Closes https://github.com/facebook/react-native/pull/18718

Differential Revision: D7542458

Pulled By: hramos

fbshipit-source-id: 77c9c7cae77971d62e878c4832b2e1d205131e8f
This commit is contained in:
Matt Oakes 2018-04-09 11:15:22 -07:00 committed by Facebook Github Bot
parent bfcfe7961d
commit 43014eaf19

View File

@ -297,6 +297,7 @@ const mockNativeModules = {
BlobModule: {
BLOB_URI_SCHEME: 'content',
BLOB_URI_HOST: null,
addNetworkingHandler: jest.fn(),
enableBlobSupport: jest.fn(),
disableBlobSupport: jest.fn(),
createFromParts: jest.fn(),