mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-19 01:51:21 +08:00
fix: fix tests
This commit is contained in:
@@ -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),
|
||||
}),
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user