From f74c7b916a9c8056d41eb0a5407457af2f034b20 Mon Sep 17 00:00:00 2001 From: Matt Oakes Date: Mon, 9 Apr 2018 11:15:22 -0700 Subject: [PATCH] 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 --- jest/setup.js | 1 + 1 file changed, 1 insertion(+) diff --git a/jest/setup.js b/jest/setup.js index 0d4553b3f756f8..52916060777e87 100644 --- a/jest/setup.js +++ b/jest/setup.js @@ -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(),