fix: fix tests

This commit is contained in:
Catriel Müller
2026-06-15 21:27:50 -03:00
parent 04d25fdf6d
commit 0c0b95fac6
2 changed files with 12 additions and 12 deletions
@@ -177,13 +177,13 @@ export const ExperimentalApi = HttpApi.make("experimental")
),
HttpApiEndpoint.get("worktree", ExperimentalPaths.worktree, {
query: WorkspaceRoutingQuery,
success: described(WorktreeList, "List of worktrees"),
success: described(WorktreeList, "List of worktrees"), // kilocode_change
error: WorktreeApiError,
}).annotateMerge(
OpenApi.annotations({
identifier: "worktree.list",
summary: "List worktrees",
description: "List all git worktrees for the current project and whether Kilo manages them.",
description: "List all git worktrees for the current project and whether Kilo manages them.", // kilocode_change
}),
),
HttpApiEndpoint.post("worktreeCreate", ExperimentalPaths.worktree, {
@@ -167,19 +167,19 @@ describe("experimental.session.list", () => {
try {
const { Server } = await import("../../src/server/server")
const branch = await WithInstance.provide({
const branch = await withTestInstance({
directory: worktree,
fn: () => create("worktree-session"),
fn: (ctx) => create("worktree-session", ctx),
})
const root = await WithInstance.provide({
const root = await withTestInstance({
directory: first.path,
fn: async () => ({
fn: async (ctx) => ({
app: Server.Default().app,
project: await Server.Default().app.request("/project/current", {
headers: { "x-kilo-directory": first.path },
}),
session: await create("root-session"),
session: await create("root-session", ctx),
}),
})
@@ -219,19 +219,19 @@ describe("experimental.session.list", () => {
try {
const { Server } = await import("../../src/server/server")
const branch = await WithInstance.provide({
const branch = await withTestInstance({
directory: worktree,
fn: () => create("worktree-session"),
fn: (ctx) => create("worktree-session", ctx),
})
const root = await WithInstance.provide({
const root = await withTestInstance({
directory: first.path,
fn: async () => ({
fn: async (ctx) => ({
app: Server.Default().app,
project: await Server.Default().app.request("/project/current", {
headers: { "x-kilo-directory": first.path },
}),
session: await create("root-session"),
session: await create("root-session", ctx),
}),
})