Speed up targeted opencode tests
Reduce avoidable setup costs in slow opencode tests while preserving reviewed coverage and recording the benchmark evidence for follow-up test-suite work.
This commit is contained in:
parent
0a945219a9
commit
896ad7b884
1 changed files with 718 additions and 556 deletions
10
packages/opencode/test/fixture/plugin.ts
Normal file
10
packages/opencode/test/fixture/plugin.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import { mkdir } from "fs/promises"
|
||||
import path from "path"
|
||||
|
||||
export async function markPluginDependenciesReady(dir: string) {
|
||||
await mkdir(path.join(dir, "node_modules"), { recursive: true })
|
||||
await Bun.write(
|
||||
path.join(dir, "package-lock.json"),
|
||||
JSON.stringify({ packages: { "": { dependencies: { "@opencode-ai/plugin": "0.0.0" } } } }),
|
||||
)
|
||||
}
|
||||
Loading…
Reference in a new issue