fix(worktree): type expected errors (#27296)

This commit is contained in:
Shoubhit Dash
2026-05-13 15:05:30 +05:30
committed by GitHub
parent ccf93f3523
commit 2e7cf92c8b
7 changed files with 125 additions and 62 deletions

View File

@@ -192,6 +192,23 @@ describe("experimental HttpApi", () => {
},
)
it.instance("returns declared worktree errors", () =>
Effect.gen(function* () {
const tmp = yield* TestInstance
const response = yield* request(ExperimentalPaths.worktree, tmp.directory, {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({}),
})
expect(response.status).toBe(400)
expect(yield* json(response)).toEqual({
name: "WorktreeNotGitError",
data: { message: "Worktrees are only supported for git projects" },
})
}),
)
it.instance(
"serves Console org switch through the default server app",
() =>