From b90720d27031c4c2f24fcbe75252e6a6eaeb3db0 Mon Sep 17 00:00:00 2001 From: StanPonomarev Date: Fri, 18 Sep 2026 10:15:50 +0200 Subject: [PATCH] fix tests --- tests/composite.test.ts | 3 ++- tests/herdr.test.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/composite.test.ts b/tests/composite.test.ts index 1865407..7fff670 100644 --- a/tests/composite.test.ts +++ b/tests/composite.test.ts @@ -1,5 +1,6 @@ import { afterEach, expect, test } from "bun:test"; import { chmod, mkdir, mkdtemp, readFile, rm, writeFile } from "node:fs/promises"; +import { tmpdir } from "node:os"; import { join } from "node:path"; import { Effect, PubSub, Schema, Stream } from "effect"; import { Agent, Model, Provider } from "@opencode/plugin"; @@ -27,7 +28,7 @@ interface LocationInstance { admit: () => Effect.Effect; } const scenario = async () => { - const directory = await mkdtemp("/tmp/opencode/composite-"); + const directory = await mkdtemp(join(tmpdir(), "composite-")); directories.push(directory); const root = join(directory, "root"); const destination = join(directory, "child"); diff --git a/tests/herdr.test.ts b/tests/herdr.test.ts index f841fb1..5bc11fc 100644 --- a/tests/herdr.test.ts +++ b/tests/herdr.test.ts @@ -1,5 +1,6 @@ import { afterEach, expect, test } from "bun:test"; import { mkdir, mkdtemp, rm } from "node:fs/promises"; +import { tmpdir } from "node:os"; import { join } from "node:path"; import { command, Herdr } from "../src/herdr.js"; @@ -10,7 +11,7 @@ afterEach(async () => { }); async function fixture() { - const temporary = await mkdtemp("/tmp/opencode/multi-work-"); + const temporary = await mkdtemp(join(tmpdir(), "multi-work-")); directories.push(temporary); const root = join(temporary, "root"); const destination = join(temporary, "returned checkout");