react-native-macos/jest
Rick Hanlon 9c64bd5739 Properly handle LogBox errors during tests
Summary:
This diff fixes an issue where errors in LogBox during tests would cause the tests to crash.

The crash is due to the NativeExceptionsManager module not being mocked (as all native module need to be in tests). The fix is to properly mock the NativeExceptionManger.

This fix exposed an infinite loop issue where failures in LogBox will be logged to the ExceptionManager, which logs to the console, which logs to LogBox, creating a loop. This diff also fixes that look by moving the LogBox internal error check to the top of the monkey patched console methods.

Changelog: [Internal]

Differential Revision: D20428590

fbshipit-source-id: 7289a480c99ba8dee67772178b7629afb40b330a
2020-03-19 20:31:01 -07:00
..
MockNativeMethods.js change jest native method mocks to jest functions (#24337) 2019-04-07 11:54:48 -07:00
assetFileTransformer.js Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
mockComponent.js use requireActual and requireMock from jest instead of require (#21849) 2018-10-18 15:32:15 -07:00
preprocessor.js deploy 120 to xplat 2020-03-06 11:09:08 -08:00
renderer.js deploy 120 to xplat 2020-03-06 11:09:08 -08:00
setup.js Properly handle LogBox errors during tests 2020-03-19 20:31:01 -07:00