From f345f86c78218522ee42e6502200cb3e390afb64 Mon Sep 17 00:00:00 2001 From: sudacode Date: Tue, 7 Jul 2026 00:26:47 -0700 Subject: [PATCH] test(clipboard-queue): write scratch file to os.tmpdir instead of dist/ Auto-discovery in the new test lanes runs clipboard-queue.test.ts, which was never in the old hand-maintained lists. It wrote its stub media file to dist/, which does not exist during the source-test step on a fresh CI checkout (build runs later), so the suite failed. Use a real temp dir. --- src/main/runtime/clipboard-queue.test.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/runtime/clipboard-queue.test.ts b/src/main/runtime/clipboard-queue.test.ts index 08d23bc1..85bf3690 100644 --- a/src/main/runtime/clipboard-queue.test.ts +++ b/src/main/runtime/clipboard-queue.test.ts @@ -1,6 +1,7 @@ import test from 'node:test'; import assert from 'node:assert/strict'; import fs from 'node:fs'; +import os from 'node:os'; import path from 'node:path'; import { appendClipboardVideoToQueueRuntime } from './clipboard-queue'; @@ -27,7 +28,8 @@ test('appendClipboardVideoToQueueRuntime rejects unsupported clipboard path', () }); test('appendClipboardVideoToQueueRuntime queues readable media file', () => { - const tempPath = path.join(process.cwd(), 'dist', 'clipboard-queue-test-video.mkv'); + const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'clipboard-queue-')); + const tempPath = path.join(tempDir, 'clipboard-queue-test-video.mkv'); fs.writeFileSync(tempPath, 'stub'); const commands: Array<(string | number)[]> = []; @@ -43,5 +45,5 @@ test('appendClipboardVideoToQueueRuntime queues readable media file', () => { assert.deepEqual(commands[0], ['loadfile', tempPath, 'append']); assert.equal(osdMessages[0], `Queued from clipboard: ${path.basename(tempPath)}`); - fs.unlinkSync(tempPath); + fs.rmSync(tempDir, { recursive: true, force: true }); });