Skip to content

Android: unit tests for package install codepaths - #53

Merged
ofalvai merged 1 commit into
masterfrom
android-existing-package-tests
Sep 4, 2026
Merged

Android: unit tests for package install codepaths#53
ofalvai merged 1 commit into
masterfrom
android-existing-package-tests

Conversation

@ofalvai

@ofalvai ofalvai commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Before merging #42 and #43, it would give us more confidence if the whole package install codepath was covered with tests (E2E tests don't cover every scenario).

Thanks to #38, unit tests are now possible on the Android side.

Changes

  • Extract package installation logic to its own method for direct testing.
  • Test that method with all input combinations: raw JS update, ZIP, signature verification, diff updates.

Out of scope

I'd like to land this PR first, then rebase #42 and include new test cases for binary diff patching.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The only unresolved comment is a non-blocking wording nit.

Pull request overview

Adds Android JVM unit coverage for downloaded package installation paths.

Changes:

  • Extracts package installation logic for direct testing.
  • Tests raw, ZIP, integrity, signature, and differential updates.
  • Adds JSON and Mockito test dependencies.
File summaries
File Description
android/app/src/test/java/com/microsoft/codepush/react/CodePushUpdateManagerTest.kt Adds installation-path tests. Minor wording nit: change “as long there is” to “as long as there is.”
android/app/src/main/java/com/microsoft/codepush/react/CodePushUpdateManager.java Extracts installation logic into a package-visible method.
android/app/build.gradle Adds required test dependencies.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ofalvai
ofalvai force-pushed the android-existing-package-tests branch from 1794c83 to 182cec5 Compare September 4, 2026 07:35
@ofalvai
ofalvai merged commit 4e25ffb into master Sep 4, 2026
6 checks passed
@ofalvai
ofalvai deleted the android-existing-package-tests branch September 4, 2026 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants