From 4e1dfa48a25d00a3507fe5e02e0aeb268fc388cf Mon Sep 17 00:00:00 2001 From: Mike Grabowski Date: Thu, 19 Oct 2017 13:44:28 -0700 Subject: [PATCH] Fix test suite when running on a feature branch Summary: Test suite for React Native version check relies on `ReactNativeVersion.js` file that is modified on a release branch (it contains values of a real version, not zeros). That makes it impossible for the build to pass: https://circleci.com/gh/facebook/react-native/23494 This PR mocks it with zero values, just like we mock it in other suites. I am not sure if that is desired, but works for now. CC ide Closes https://github.com/facebook/react-native/pull/16464 Differential Revision: D6100285 Pulled By: hramos fbshipit-source-id: 784f7e14f5283403f3fa518940565e1ef19dd398 --- Libraries/Core/__tests__/ReactNativeVersionCheck-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/Core/__tests__/ReactNativeVersionCheck-test.js b/Libraries/Core/__tests__/ReactNativeVersionCheck-test.js index dbafabcd566bf2..e1b30001d2a3f8 100644 --- a/Libraries/Core/__tests__/ReactNativeVersionCheck-test.js +++ b/Libraries/Core/__tests__/ReactNativeVersionCheck-test.js @@ -41,7 +41,7 @@ function _defineCheckVersionTests() { }); it('passes when all the versions are zero', () => { - jest.dontMock('ReactNativeVersion'); + _mockJsVersion(0, 0, 0); _mockNativeVersion(0, 0, 0); const ReactNativeVersion = require('ReactNativeVersion');