test(files): cover the review's two remaining outside-worktree cases

The symlinked .git folder test now also runs from a session in the main
checkout, as well as from a linked worktree. A new pane-watcher test
checks that an unparseable docker-cases.json follows nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Michael GrundbergandClaude Opus 5.5 committed 2026-11-06 21:13:45 +01:00
1 parent 8d33f53fd0
commit e2359aa0e8
2 files changed
+17 -1

No files matched your search

+3 -1
View File
@@ -157,7 +157,9 @@ describe('findLiveWorktree outside the session folder', () => {
const fake = join(base, 'fake');
mkdirSync(fake);
symlinkSync(join(repo, '.git'), join(fake, '.git'));
// The session is in the linked worktree, so the main-worktree branch is the one exercised.
// From a session in the main checkout.
expect(await findLiveWorktree(repo, fake, { home })).toBeUndefined();
// From a session in a linked worktree.
expect(await findLiveWorktree(sibling, fake, { home })).toBeUndefined();
// The real main worktree is still followed from the same session.
expect(await findLiveWorktree(sibling, repo, { home })).toEqual({ name: 'myapp', path: repo, outside: true });