Something went wrong. Try again.
opencode v2 mirror
Something went wrong. Try again.
726 B · 23 lines
TypeScript
123456789101112131415161718192021222324import { expect, test } from "bun:test"import { fileURLToPath } from "node:url"
test("LocalProvider selection integration", async () => { // Isolate provider module substitutions from the rest of the browser suite. const child = Bun.spawn( [ process.execPath, "test", "--conditions=browser", "--preload", "./happydom.ts", "./test-browser/fixtures/model-selection.ts", ], { cwd: fileURLToPath(new URL("..", import.meta.url)), stdout: "pipe", stderr: "pipe" }, ) const [status, stdout, stderr] = await Promise.all([ child.exited, new Response(child.stdout).text(), new Response(child.stderr).text(), ]) expect(status, stdout + stderr).toBe(0)}, 30_000)