You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The RunMacOS and RunWindows commands in src/extension/commands/runMacOs.ts and src/extension/commands/runWindows.ts have no unit tests. All major platform run commands (Android, EasBuild) have recently been covered; macOS and Windows are the remaining gap.
Why this is useful
Consistent test coverage across all platform run commands reduces regression risk. Both commands share the same onBeforeExecute structure (resolve RN versions, check platform support, fire a TipNotificationService update) as the already-tested Android command, making these tests straightforward to add and high-value for catching regressions. RunMacOS also swallows errors from the platform setup phase (try/catch in baseFn) — a subtle behavior worth explicitly documenting with a test.
Summary
The
RunMacOSandRunWindowscommands insrc/extension/commands/runMacOs.tsandsrc/extension/commands/runWindows.tshave no unit tests. All major platform run commands (Android, EasBuild) have recently been covered; macOS and Windows are the remaining gap.Why this is useful
Consistent test coverage across all platform run commands reduces regression risk. Both commands share the same
onBeforeExecutestructure (resolve RN versions, check platform support, fire a TipNotificationService update) as the already-tested Android command, making these tests straightforward to add and high-value for catching regressions.RunMacOSalso swallows errors from the platform setup phase (try/catchinbaseFn) — a subtle behavior worth explicitly documenting with a test.Suggested scope
test/extension/commands/runMacOs.test.tscoveringRunMacOSonBeforeExecute: checksREACT_NATIVE_MACOSpackage and callscheckTargetPlatformSupportrunAppstill proceedstest/extension/commands/runWindows.test.tscoveringRunWindowsonBeforeExecute: checksREACT_NATIVE_WINDOWSpackage and callscheckTargetPlatformSupporttest/extension/commands/runAndroid.test.tsEvidence
src/extension/commands/runMacOs.ts— 53 lines, no corresponding test filesrc/extension/commands/runWindows.ts— 48 lines, no corresponding test filetest/extension/commands/runAndroid.test.tsestablished the proxyquire pattern (merged in [Feature] Add unit tests for RunAndroid command flow #2852)test/extension/commands/runEasBuild.test.tsand others confirm the project is actively filling command test coveragefind test/extension/commands -name "runMacOs*" -o -name "runWindows*"returns nothingValidation
npm run test:unit(or the equivalent mocha suite) passes with the new test files