diff --git a/public/projects.ts b/public/projects.ts index 54b82c7..d72fc3c 100644 Binary files a/public/projects.ts and b/public/projects.ts differ diff --git a/test/worktree-form.test.ts b/test/worktree-form.test.ts index bf79eee..27f617e 100644 --- a/test/worktree-form.test.ts +++ b/test/worktree-form.test.ts @@ -230,7 +230,7 @@ describe('renderNewWorktreeForm', () => { expect(errorEl.style.display).not.toBe('none') }) - it('POSTs to /projects/worktree with repoPath and branch on valid input', async () => { + it('POSTs to /projects/worktree with path and branch on valid input', async () => { const mockFetch = vi.fn().mockResolvedValue({ ok: true, json: async () => ({ ok: true, path: '/home/user/my-repo-worktrees/feat', branch: 'feat' }), @@ -249,7 +249,9 @@ describe('renderNewWorktreeForm', () => { '/projects/worktree', expect.objectContaining({ method: 'POST', - body: JSON.stringify({ repoPath: '/home/user/my-repo', branch: 'feat' }), + // regression: the server (server.ts) + the docs contract read body.path, + // NOT body.repoPath — sending repoPath 400'd every browser worktree-create. + body: JSON.stringify({ path: '/home/user/my-repo', branch: 'feat' }), }), ) })