Tests take away the commands and agents they write into the shared config directory
ci / check (push) Canceled after 0s
ci / check (push) Canceled after 0s
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
2 files changed
+12
-4
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, test } from "bun:test"
|
||||
import { mkdirSync, mkdtempSync, writeFileSync } from "node:fs"
|
||||
import { afterAll, describe, expect, test } from "bun:test"
|
||||
import { mkdirSync, mkdtempSync, writeFileSync, rmSync } from "node:fs"
|
||||
import { tmpdir } from "node:os"
|
||||
import { join } from "node:path"
|
||||
import { paths } from "../src/config/paths.ts"
|
||||
@@ -9,6 +9,10 @@ import { customCommands, expandCommand } from "../src/project/commands.ts"
|
||||
import { FileIndex } from "../src/project/files.ts"
|
||||
import { findProject, projectDirName } from "../src/project/root.ts"
|
||||
|
||||
// The whole suite shares one config directory: what this file puts under commands/ is taken away
|
||||
// again, or every later start-up warns about it.
|
||||
afterAll(() => rmSync(join(paths.config, "commands"), { recursive: true, force: true }))
|
||||
|
||||
function tree() {
|
||||
const root = mkdtempSync(join(tmpdir(), "ph-proj-"))
|
||||
mkdirSync(join(root, "src/deep"), { recursive: true })
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { afterEach, describe, expect, test } from "bun:test"
|
||||
import { mkdirSync, mkdtempSync, writeFileSync } from "node:fs"
|
||||
import { afterAll, afterEach, describe, expect, test } from "bun:test"
|
||||
import { mkdirSync, mkdtempSync, writeFileSync, rmSync } from "node:fs"
|
||||
import { tmpdir } from "node:os"
|
||||
import { join } from "node:path"
|
||||
import { createApp } from "../src/app.ts"
|
||||
@@ -9,6 +9,10 @@ import { createView } from "../src/tui/state.ts"
|
||||
import { MARKS } from "../src/jobs/note.ts"
|
||||
import { delta, fakeProvider, toolCall, type Fake } from "./fake-provider.ts"
|
||||
|
||||
// The whole suite shares one config directory: what this file puts under agents/ is taken away
|
||||
// again, or every later start-up warns about it.
|
||||
afterAll(() => rmSync(join(paths.config, "agents"), { recursive: true, force: true }))
|
||||
|
||||
let fake: Fake | undefined
|
||||
let other: Fake | undefined
|
||||
afterEach(() => (fake?.stop(), other?.stop(), (other = undefined)))
|
||||
|
||||
Reference in new issue
Block a user