mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-03 07:33:45 +00:00
test: lock in process, ripgrep, and installation helpers
This commit is contained in:
@@ -56,4 +56,20 @@ describe("util.process", () => {
|
||||
expect(out.code).not.toBe(0)
|
||||
expect(Date.now() - started).toBeLessThan(1000)
|
||||
}, 3000)
|
||||
|
||||
test("uses cwd when spawning commands", async () => {
|
||||
const out = await Process.run(node('process.stdout.write(process.cwd())'), {
|
||||
cwd: "/tmp",
|
||||
})
|
||||
expect(out.stdout.toString()).toBe("/tmp")
|
||||
})
|
||||
|
||||
test("merges environment overrides", async () => {
|
||||
const out = await Process.run(node('process.stdout.write(process.env.OPENCODE_TEST ?? "")'), {
|
||||
env: {
|
||||
OPENCODE_TEST: "set",
|
||||
},
|
||||
})
|
||||
expect(out.stdout.toString()).toBe("set")
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user