We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 23ed652 commit 050f99eCopy full SHA for 050f99e
1 file changed
packages/opencode/test/util/process.test.ts
@@ -1,5 +1,6 @@
1
import { describe, expect, test } from "bun:test"
2
import { Process } from "../../src/util/process"
3
+import { tmpdir } from "../fixture/fixture"
4
5
function node(script: string) {
6
return [process.execPath, "-e", script]
@@ -58,10 +59,11 @@ describe("util.process", () => {
58
59
}, 3000)
60
61
test("uses cwd when spawning commands", async () => {
62
+ await using tmp = await tmpdir()
63
const out = await Process.run(node("process.stdout.write(process.cwd())"), {
- cwd: "/tmp",
64
+ cwd: tmp.path,
65
})
- expect(out.stdout.toString()).toBe("/tmp")
66
+ expect(out.stdout.toString()).toBe(tmp.path)
67
68
69
test("merges environment overrides", async () => {
0 commit comments