Skip to content

[Feature] Add unit tests for OpenExpoUpgradeHelper command #2838

Description

@ConnorQi01

Summary

The OpenExpoUpgradeHelper command (src/extension/commands/openExpoUpgradeHelper.ts) currently has no unit tests. Its sibling command OpenRNUpgradeHelper just received full unit test coverage in PR #2832, but the Expo variant remains untested.

Why this is useful

Adding unit tests for this command continues the team's systematic command-level test coverage initiative. It ensures that regressions in the Expo upgrade helper workflow are caught early, and documents expected behavior for the vscode.env.openExternal call and error handling paths.

Suggested scope

  • Add test/extension/commands/openExpoUpgradeHelper.test.ts mirroring the structure of openRNUpgradeHelper.test.ts
  • Cover: successful URL open, command error path (e.g. when openExternal rejects), and requiresProject guard behavior
  • Verify codeName and label values match package.json registration

Evidence

  • src/extension/commands/openExpoUpgradeHelper.ts exists with no corresponding test file
  • test/extension/commands/openRNUpgradeHelper.test.ts was just added in PR Add OpenRNUpgradeHelper command unit tests #2832 and provides a direct template
  • Pattern of systematic command-level test additions is visible across v1.14.1 release notes (prebuildClean, setNewArch, startPackager, reopenQRCode, openRNUpgradeHelper, launchAndroidSimulator)

Validation

  • Run npm run test and confirm the new test file is picked up and passes
  • Verify no existing test in commands.test.ts duplicates the new coverage

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions