From 2fb4aff57bdeea57069bbdef737426ea9987dfa8 Mon Sep 17 00:00:00 2001 From: OrcaWin <293788423+OrcaWin@users.noreply.github.com> Date: Wed, 22 Jul 2026 18:54:30 -0700 Subject: [PATCH] test(runtime): use platform temp paths --- src/main/runtime/orca-runtime.test.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/runtime/orca-runtime.test.ts b/src/main/runtime/orca-runtime.test.ts index 5881f944a5c..0a83a6e4aa7 100644 --- a/src/main/runtime/orca-runtime.test.ts +++ b/src/main/runtime/orca-runtime.test.ts @@ -7140,7 +7140,7 @@ describe('OrcaRuntimeService', () => { getRepo: (id: string) => added.find((repo) => repo.id === id) as never } const runtime = new OrcaRuntimeService(createStore as never) - const tempRoot = await mkdtemp('/tmp/orca-runtime-create-parent-') + const tempRoot = await mkdtemp(join(tmpdir(), 'orca-runtime-create-parent-')) const parentDir = join(tempRoot, 'orca', 'projects') try { const result = await runtime.createRepo(parentDir, 'first-project', 'folder') @@ -7167,7 +7167,7 @@ describe('OrcaRuntimeService', () => { getRepo: (id: string) => added.find((repo) => repo.id === id) as never } const runtime = new OrcaRuntimeService(runtimeStore as never) - const parentDir = await mkdtemp('/tmp/orca-runtime-create-root-prep-') + const parentDir = await mkdtemp(join(tmpdir(), 'orca-runtime-create-root-prep-')) try { const result = await runtime.createRepo(parentDir, 'runtime-create-root-prep', 'folder') if ('error' in result) { @@ -7181,10 +7181,11 @@ describe('OrcaRuntimeService', () => { }) it('preserves existing badgeColor on runtime createRepo dedupe', async () => { + const repoName = 'runtime-existing-create' const existing = { - id: 'runtime-existing-create', - path: '/tmp/runtime-existing-create', - displayName: 'runtime-existing-create', + id: repoName, + path: join(tmpdir(), repoName), + displayName: repoName, badgeColor: '#14b8a6', addedAt: 1, kind: 'folder' as const @@ -7195,7 +7196,7 @@ describe('OrcaRuntimeService', () => { } const runtime = new OrcaRuntimeService(colorStore as never) - const result = await runtime.createRepo('/tmp', 'runtime-existing-create', 'folder') + const result = await runtime.createRepo(tmpdir(), repoName, 'folder') expect(result).toEqual({ repo: existing }) expect(result).toHaveProperty('repo.badgeColor', '#14b8a6')