test: fix Windows CI execution and resolve exposed platform failures (#24476)

This commit is contained in:
Emily Hedlund
2026-04-03 08:50:29 -07:00
committed by GitHub
parent 7a70ab9a5d
commit ca0e6f9bd9
21 changed files with 308 additions and 175 deletions

View File

@@ -513,7 +513,11 @@ describe('HookRunner', () => {
const args = vi.mocked(spawn).mock.calls[
executionOrder.length
][1] as string[];
const command = args[args.length - 1];
let command = args[args.length - 1];
// On Windows, the command is wrapped in PowerShell syntax
if (command.includes('; if ($LASTEXITCODE -ne 0)')) {
command = command.split(';')[0];
}
executionOrder.push(command);
setImmediate(() => callback(0));
}