(workspacePath: string, branchName: string)
| 2554 | ); |
| 2555 | |
| 2556 | const expectHealthyWorktree = async (workspacePath: string, branchName: string) => { |
| 2557 | const checkoutCheck = await execSSH( |
| 2558 | runtime, |
| 2559 | `test -f "${workspacePath}/.git" && git -C "${workspacePath}" branch --show-current` |
| 2560 | ); |
| 2561 | expect(checkoutCheck.stdout.trim()).toBe(branchName); |
| 2562 | |
| 2563 | const insideWorkTreeCheck = await execSSH( |
| 2564 | runtime, |
| 2565 | `git -C "${workspacePath}" rev-parse --is-inside-work-tree` |
| 2566 | ); |
| 2567 | expect(insideWorkTreeCheck.stdout.trim()).toBe("true"); |
| 2568 | |
| 2569 | const statusCheck = await execSSH( |
| 2570 | runtime, |
| 2571 | `git -C "${workspacePath}" status --porcelain` |
| 2572 | ); |
| 2573 | expect(statusCheck.exitCode).toBe(0); |
| 2574 | |
| 2575 | const coreBareCheck = await execSSH( |
| 2576 | runtime, |
| 2577 | `git -C "${workspacePath}" config --get core.bare` |
| 2578 | ); |
| 2579 | expect(coreBareCheck.exitCode).toBe(1); |
| 2580 | }; |
| 2581 | |
| 2582 | // 1. Init workspace A — creates the base repo, syncs bundle, creates worktree. |
| 2583 | const initA = await runtime.initWorkspace({ |
no test coverage detected