Summary
The LaunchExpoWeb command in src/extension/commands/launchExpoWeb.ts has no dedicated unit tests. It has two meaningful paths: non-Expo projects return without starting anything, while Expo managed projects create an ExponentPlatform and run the web packager preparation/start sequence.
Why this is useful
A regression in Expo project detection or the web packager startup sequence could break the Expo Web command without being caught by the current command tests. Dedicated unit coverage would verify both the early-return behavior and the successful launch path without requiring a real Expo project.
Suggested scope
- Add
test/extension/commands/launchExpoWeb.test.ts using the existing proxyquire + Sinon command-test pattern.
- Stub
OutputChannelLogger, ExponentPlatform, getRunOptions, and the project Expo helper.
- Test:
isExpoManagedApp(true) returns false → no platform is created and no packager methods are called.
- Test:
isExpoManagedApp(true) returns true → beforeStartPackager() and startPackager() are called in order.
- Verify the platform receives Expo Web run options and the project packager.
Evidence
src/extension/commands/launchExpoWeb.ts contains the Expo detection and startup flow.
- No
test/extension/commands/launchExpoWeb.test.ts exists.
- No existing issue or PR references
launchExpoWeb test coverage.
Validation
- Run targeted formatting/lint checks for the new test.
- Run
npm run build.
- Run
npm test and confirm the new suite passes.
Summary
The
LaunchExpoWebcommand insrc/extension/commands/launchExpoWeb.tshas no dedicated unit tests. It has two meaningful paths: non-Expo projects return without starting anything, while Expo managed projects create anExponentPlatformand run the web packager preparation/start sequence.Why this is useful
A regression in Expo project detection or the web packager startup sequence could break the Expo Web command without being caught by the current command tests. Dedicated unit coverage would verify both the early-return behavior and the successful launch path without requiring a real Expo project.
Suggested scope
test/extension/commands/launchExpoWeb.test.tsusing the existingproxyquire+ Sinon command-test pattern.OutputChannelLogger,ExponentPlatform,getRunOptions, and the project Expo helper.isExpoManagedApp(true)returnsfalse→ no platform is created and no packager methods are called.isExpoManagedApp(true)returnstrue→beforeStartPackager()andstartPackager()are called in order.Evidence
src/extension/commands/launchExpoWeb.tscontains the Expo detection and startup flow.test/extension/commands/launchExpoWeb.test.tsexists.launchExpoWebtest coverage.Validation
npm run build.npm testand confirm the new suite passes.