summaryrefslogtreecommitdiffhomepage
path: root/packages/opencode/test/server/httpapi-session.test.ts
diff options
context:
space:
mode:
authorKit Langton <[email protected]>2026-04-27 13:17:11 -0400
committerGitHub <[email protected]>2026-04-27 17:17:11 +0000
commit55ecb0674846ad9f914fd852c53ad8e8deab7da4 (patch)
tree925b9919c93a808d1582ba8feb24dcf34166bda3 /packages/opencode/test/server/httpapi-session.test.ts
parentdc6991e5a8efd963a43e8834a35706ec67f6a903 (diff)
downloadopencode-55ecb0674846ad9f914fd852c53ad8e8deab7da4.tar.gz
opencode-55ecb0674846ad9f914fd852c53ad8e8deab7da4.zip
fix(httpapi): accept empty session create body (#24640)
Diffstat (limited to 'packages/opencode/test/server/httpapi-session.test.ts')
-rw-r--r--packages/opencode/test/server/httpapi-session.test.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/opencode/test/server/httpapi-session.test.ts b/packages/opencode/test/server/httpapi-session.test.ts
index e6c091982..d1d36c7d4 100644
--- a/packages/opencode/test/server/httpapi-session.test.ts
+++ b/packages/opencode/test/server/httpapi-session.test.ts
@@ -151,6 +151,14 @@ describe("session HttpApi", () => {
await using tmp = await tmpdir({ git: true, config: { formatter: false, lsp: false, share: "disabled" } })
const headers = { "x-opencode-directory": tmp.path, "content-type": "application/json" }
+ const createdEmpty = await json<Session.Info>(
+ await app().request(SessionPaths.create, {
+ method: "POST",
+ headers,
+ }),
+ )
+ expect(createdEmpty.id).toBeTruthy()
+
const created = await json<Session.Info>(
await app().request(SessionPaths.create, {
method: "POST",