Add instrumentation coverage for WearConnectivity module#72
Add instrumentation coverage for WearConnectivity module#72fabOnReact wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| androidTestImplementation 'androidx.test.ext:junit:1.1.5' | ||
| androidTestImplementation 'androidx.test:runner:1.5.2' | ||
| androidTestImplementation 'androidx.test:core:1.5.0' | ||
| androidTestImplementation 'org.mockito:mockito-android:5.8.0' | ||
| androidTestImplementation 'org.mockito:mockito-inline:5.2.0' |
There was a problem hiding this comment.
Align Mockito artifact versions for static mocking
Instrumentation tests rely on MockedStatic for Wearable and GoogleApiAvailability, but the added dependencies pull mockito-android:5.8.0 alongside mockito-inline:5.2.0. These artifacts embed different mockito-core/ByteBuddy versions, and Gradle will resolve a mixed classpath (inline 5.2 with core 5.8). When the tests attempt static mocking, this version skew commonly fails at runtime with NoSuchMethodError or MockitoException because the inline mock maker expects the same version as the core library. Using matching versions (e.g., both 5.8.0) avoids those failures and ensures the new instrumentation tests can actually run.
Useful? React with 👍 / 👎.
Summary
AndroidJUnitRunnerand include AndroidX test and Mockito dependenciesWearConnectivityModulemessaging and file transfer flows by mocking the underlying Wearable clientsTesting
Cannot use @TaskAction annotation on method IncrementalTask.taskAction$gradle_core()because the Android Gradle Plugin 7.2.1 is incompatible with the Gradle wrapper version)https://chatgpt.com/codex/tasks/task_e_68fbceb94cd483208150d2f946e24c34