mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-08-30 17:14:40 +08:00
fix: address third-pass upstream merge review
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { describe, expect } from "bun:test"
|
||||
import { Effect } from "effect"
|
||||
import path from "path"
|
||||
import { mkdir } from "node:fs/promises" // kilocode_change
|
||||
import { cliIt } from "../lib/cli-process"
|
||||
|
||||
describe("opencode mcp add (non-interactive subprocess)", () => {
|
||||
@@ -71,4 +72,27 @@ describe("opencode mcp add (non-interactive subprocess)", () => {
|
||||
}),
|
||||
60_000,
|
||||
)
|
||||
|
||||
// kilocode_change start
|
||||
cliIt.concurrent(
|
||||
"writes to KILO_CONFIG_DIR without touching the default profile",
|
||||
({ home, opencode }) =>
|
||||
Effect.gen(function* () {
|
||||
const profile = path.join(home, "profile")
|
||||
yield* Effect.promise(() => mkdir(profile, { recursive: true }))
|
||||
const result = yield* opencode.spawn(
|
||||
["mcp", "add", "profile", "--url", "https://example.com/profile"],
|
||||
{ env: { KILO_CONFIG_DIR: profile } },
|
||||
)
|
||||
opencode.expectExit(result, 0)
|
||||
|
||||
const config = yield* Effect.promise(() => Bun.file(path.join(profile, "kilo.json")).json())
|
||||
expect(config.mcp.profile).toEqual({ type: "remote", url: "https://example.com/profile" })
|
||||
expect(yield* Effect.promise(() => Bun.file(path.join(home, ".config", "kilo", "kilo.json")).exists())).toBe(
|
||||
false,
|
||||
)
|
||||
}),
|
||||
60_000,
|
||||
)
|
||||
// kilocode_change end
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user