MCPcopy Index your code
hub / github.com/anomalyco/opencode / check

Function check

packages/opencode/test/cli/tui/thread.test.ts:19–30  ·  view source on GitHub ↗
(project?: string)

Source from the content-addressed store, hash-verified

17 })
18
19 async function check(project?: string) {
20 await using tmp = await tmpdir({ git: true })
21 const link = path.join(path.dirname(tmp.path), path.basename(tmp.path) + "-link")
22 const type = process.platform === "win32" ? "junction" : "dir"
23
24 try {
25 await fs.symlink(tmp.path, link, type)
26 expect(resolveThreadDirectory(project, link, tmp.path)).toBe(tmp.path)
27 } finally {
28 await fs.rm(link, { recursive: true, force: true }).catch(() => undefined)
29 }
30 }
31
32 test("uses the real cwd when PWD points at a symlink", async () => {
33 await check()

Callers 3

thread.test.tsFile · 0.70
takeFunction · 0.50
waitForFunction · 0.50

Calls 2

tmpdirFunction · 0.90
resolveThreadDirectoryFunction · 0.90

Tested by

no test coverage detected