diff --git a/src/features/team-mode/team-worktree/cleanup.test.ts b/src/features/team-mode/team-worktree/cleanup.test.ts index f47c63af9..f9b1c711d 100644 --- a/src/features/team-mode/team-worktree/cleanup.test.ts +++ b/src/features/team-mode/team-worktree/cleanup.test.ts @@ -2,7 +2,7 @@ import { afterAll, expect, test } from "bun:test" import fs from "node:fs/promises" -import os from "node:os" +import { tmpdir } from "node:os" import path from "node:path" import { findOrphanWorktrees } from "./cleanup" @@ -17,7 +17,7 @@ afterAll(async () => { test("given runtime mismatch when findOrphanWorktrees then returns orphan paths", async () => { // given - const baseDir = await fs.mkdtemp(path.join(os.tmpdir(), "team-worktree-orphans-")) + const baseDir = await fs.mkdtemp(path.join(tmpdir(), "team-worktree-orphans-")) temporaryDirectories.push(baseDir) await fs.mkdir(path.join(baseDir, "worktrees", "t1", "m1"), { recursive: true }) await fs.mkdir(path.join(baseDir, "runtime", "t1"), { recursive: true }) diff --git a/src/features/team-mode/team-worktree/manager.test.ts b/src/features/team-mode/team-worktree/manager.test.ts index b1e98556b..a133d179b 100644 --- a/src/features/team-mode/team-worktree/manager.test.ts +++ b/src/features/team-mode/team-worktree/manager.test.ts @@ -3,7 +3,7 @@ import { afterAll, beforeAll, describe, expect, mock, test } from "bun:test" import { randomUUID } from "node:crypto" import fs from "node:fs/promises" -import os from "node:os" +import { tmpdir } from "node:os" import path from "node:path" import { GitUnavailableError, createWorktree, setGitCommandRunnerForTests, validateWorktreeSpec } from "./manager" @@ -12,7 +12,7 @@ import { removeWorktree } from "./cleanup" const temporaryDirectories: string[] = [] async function initGitRepo(): Promise { - const repositoryRoot = await fs.mkdtemp(path.join(os.tmpdir(), "team-worktree-")) + const repositoryRoot = await fs.mkdtemp(path.join(tmpdir(), "team-worktree-")) temporaryDirectories.push(repositoryRoot) Bun.spawnSync(["git", "init"], { cwd: repositoryRoot, stdout: "pipe", stderr: "pipe" }) await fs.writeFile(path.join(repositoryRoot, "README.md"), "hello\n")