mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: https://github.com/facebook/react-native/issues/45596 Migrated all the assertions to use `assertThat()` function from AssertJ. Also updated the `prepareBoostTask_withMissingConfiguration_fails` test to use `assertThatThrownBy` to check if the tested task throws a given exception. ## Changelog: Migrate tests to assertj in these files: - `packages/gradle-plugin/react-native-gradle-plugin/src/test/kotlin/com/facebook/react/tasks/internal/PrepareBoostTaskTest.kt` [INTERNAL] [CHANGED] - Migrated PrepareBoostTaskTest from junit.Assert to assertj.core.api.Assertions. For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests Pull Request resolved: https://github.com/facebook/react-native/pull/45718 Test Plan: All tests pass when `./gradlew -p packages/gradle-plugin test` command is ran. <img width="454" alt="image" src="https://github.com/user-attachments/assets/9e954f7b-2208-48a9-ae15-ab642252e6da"> Reviewed By: GijsWeterings Differential Revision: D60284566 Pulled By: cortinico fbshipit-source-id: 11af0a0ca574f935e6aab3a7855b5daaeab1a718
@react-native/gradle-plugin
A Gradle Plugin used to support development of React Native applications for Android.
Installation
yarn add @react-native/gradle-plugin
Note: We're using yarn to install deps. Feel free to change commands to use npm 3+ and npx if you like
Testing
To run the tests in this package, run the following commands from the React Native root folder:
yarnto install the dependencies. You just need to run this once./gradlew -p packages/gradle-plugin test.