Compare commits

...

2 Commits

Author SHA1 Message Date
Kit Langton 47159bee67 test(drive): parse integration JSONC files 2026-08-12 20:54:16 -04:00
Kit Langton 69bba147ec test(drive): parse generated JSONC config 2026-08-12 20:46:47 -04:00
2 changed files with 8 additions and 4 deletions
+7 -3
View File
@@ -120,7 +120,9 @@ describe("opencode-drive", () => {
expect(initStatus).toBe(0)
const artifacts = initOutput.trim()
expect(await Bun.file(join(artifacts, "files", ".opencode", "opencode.jsonc")).exists()).toBe(true)
expect(await Bun.file(join(artifacts, "files", ".opencode", "opencode.jsonc")).json()).toMatchObject({
expect(
Bun.JSONC.parse(await Bun.file(join(artifacts, "files", ".opencode", "opencode.jsonc")).text()),
).toMatchObject({
model: "simulation/gpt-sim-model",
snapshots: false,
permissions: [{ action: "*", resource: "*", effect: "allow" }],
@@ -765,13 +767,15 @@ describe("opencode-drive", () => {
gitWriteError: expect.stringContaining("must not modify Git metadata"),
matches: true,
})
expect(await Bun.file(join(artifacts, "files", ".opencode", "opencode.jsonc")).json()).toMatchObject({
expect(
Bun.JSONC.parse(await Bun.file(join(artifacts, "files", ".opencode", "opencode.jsonc")).text()),
).toMatchObject({
autoupdate: false,
model: "simulation/gpt-sim-model",
providers: { simulation: { models: { "gpt-sim-model": {} } } },
test: { declared: true, setup: true },
})
expect(await Bun.file(join(artifacts, "files", ".opencode", "tui.jsonc")).json()).toEqual({
expect(Bun.JSONC.parse(await Bun.file(join(artifacts, "files", ".opencode", "tui.jsonc")).text())).toEqual({
test: { declared: true, setup: true },
})
const backendEvents = (await Bun.file(join(artifacts, "backend-events.jsonl")).text())
+1 -1
View File
@@ -15,7 +15,7 @@ describe("instance configuration", () => {
const root = await initializeInstance()
artifacts.push(root)
expect(await Bun.file(join(root, "files", ".opencode", "opencode.jsonc")).json()).toMatchObject({
expect(Bun.JSONC.parse(await Bun.file(join(root, "files", ".opencode", "opencode.jsonc")).text())).toMatchObject({
model: "simulation/gpt-sim-model",
providers: {
simulation: {