Files
react-native/packages/react-native/ReactAndroid/flipper-integration
Nicola Corti 913e92737e Bump Mockito to 3.x and remove PowerMock (#38924)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38924

## The Problem
We're currently compiling React Native with two JDK, 11 and 17.
This is necessary as we use PowerMock to mock static classes in our tests. PowerMock is effectively unmaintained and is preventing us from using only JDK 17.
Using two JDKs requires a bigger docker container and leads to build failures when contributors try to contribute to RN so we should be moving to use only a single JDK (also we can expect Google to bumpthe requirement to JDK 21 at some point in the future).

## The Solution
Practically, Mockito 3 offers the same capabilities that PowerMock offers.
I've removed PowerMock from our codebase and bumped Mockito to 3.

I've verified that all the un-ignored tests are green both with Gradle and Buck.
I've updated the Ignore-d tests to don't use PowerMock (as the project won't compile otherwise).
When we un-suppress them we will have to make sure everything works.
I've also left some TODOs referencing the old code for the future.

Changelog:
[Internal] [Changed] - Bump Mockito to 3.x and remove PowerMock

Reviewed By: cipolleschi

Differential Revision: D48228603

fbshipit-source-id: 5d4af902d813f347f19fc17361d53a73b685544d
2023-08-13 23:31:22 -07:00
..