Skip to content

Add Unit Tests for installPods Command Validation#2535

Merged
ConnorQi01 merged 3 commits intomasterfrom
dev/v-peq/add_installPods_test
Feb 28, 2026
Merged

Add Unit Tests for installPods Command Validation#2535
ConnorQi01 merged 3 commits intomasterfrom
dev/v-peq/add_installPods_test

Conversation

@ConnorQi01
Copy link
Collaborator

Summary

This PR adds comprehensive unit tests for the installPods command to ensure correct behavior across different platforms and project setups.

Key Changes

  • Added tests to verify a warning is shown when running installPods on non-macOS platforms
  • Added validation tests for missing ios directory on macOS
  • Added validation tests for missing Podfile under the ios directory
  • Introduced test helpers for:
    • Temporary project setup
    • Recursive directory cleanup
    • Mock AppLauncher creation
  • Stubbed VS Code UI APIs and OutputChannelLogger for isolated testing

Test Coverage

The new tests cover the following scenarios:

  • ✅ Platform check: non-macOS warning
  • ✅ macOS-only validation:
    • Missing ios directory
    • Missing Podfile

Notes

  • Tests are conditionally skipped based on the current platform to avoid false failures
  • No production code behavior is changed; this PR is test-only

Related Area

  • installPods command
  • iOS dependency setup via CocoaPods

@ConnorQi01 ConnorQi01 added Test javascript Pull requests that update javascript code labels Feb 27, 2026
@ConnorQi01
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ConnorQi01
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ConnorQi01
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ConnorQi01
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ConnorQi01 ConnorQi01 linked an issue Feb 28, 2026 that may be closed by this pull request
@ConnorQi01 ConnorQi01 merged commit 305f981 into master Feb 28, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update javascript code Test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Add Unit Tests for installPods Command Validation

2 participants