Summary
PrebuildClean (src/extension/commands/prebuildClean.ts) has no unit tests, while its sibling command Prebuild already has test coverage in test/extension/commands/prebuild.test.ts. The two commands share the same structure — both use CommandExecutor, AppLauncher.getNodeModulesRootByProjectPath, and OutputChannelLogger.getChannel — but PrebuildClean is missing even a basic execution path test.
Why this is useful
Keeps Expo command test coverage consistent: every CommandExecutor-based command should verify that it calls the correct CLI command from the correct project root. A future refactor of prebuildClean.ts would silently regress without a test.
Suggested scope
- Add
test/extension/commands/prebuildClean.test.ts mirroring the structure of prebuild.test.ts
- Verify that
commandExecutor.execute is called with "npx expo prebuild --clean"
- Verify the logger channel is opened with the
"Expo Prebuild Clean" label
- Verify that
AppLauncher.getNodeModulesRootByProjectPath is called with the correct project root
Evidence
src/extension/commands/prebuildClean.ts — no corresponding test file exists
test/extension/commands/prebuild.test.ts — identical structure, already covered
git log --oneline -30 — steady pattern of adding sibling tests for each command (enableHermes → enableExpoHermes, prebuild → ?, cleanRestartPackager, etc.)
Validation
npm test passes with the new test file included
- Test stubs confirm
npx expo prebuild --clean is the exact string passed to execute
Summary
PrebuildClean(src/extension/commands/prebuildClean.ts) has no unit tests, while its sibling commandPrebuildalready has test coverage intest/extension/commands/prebuild.test.ts. The two commands share the same structure — both useCommandExecutor,AppLauncher.getNodeModulesRootByProjectPath, andOutputChannelLogger.getChannel— butPrebuildCleanis missing even a basic execution path test.Why this is useful
Keeps Expo command test coverage consistent: every
CommandExecutor-based command should verify that it calls the correct CLI command from the correct project root. A future refactor ofprebuildClean.tswould silently regress without a test.Suggested scope
test/extension/commands/prebuildClean.test.tsmirroring the structure ofprebuild.test.tscommandExecutor.executeis called with"npx expo prebuild --clean""Expo Prebuild Clean"labelAppLauncher.getNodeModulesRootByProjectPathis called with the correct project rootEvidence
src/extension/commands/prebuildClean.ts— no corresponding test file existstest/extension/commands/prebuild.test.ts— identical structure, already coveredgit log --oneline -30— steady pattern of adding sibling tests for each command (enableHermes → enableExpoHermes, prebuild → ?, cleanRestartPackager, etc.)Validation
npm testpasses with the new test file includednpx expo prebuild --cleanis the exact string passed toexecute