From 541c9bd13c8fae1a171bebd0fd47c5c7c2360a2a Mon Sep 17 00:00:00 2001 From: Danila Poyarkov Date: Wed, 6 May 2026 16:16:08 +0300 Subject: [PATCH] test: move tauri helpers into domain folder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Move tests/helpers/tauri-mocks.ts → tests/helpers/tauri/mocks.ts - Move tests/helpers/tauri-fig-export-fixture.ts → tests/helpers/tauri/fig-export-fixture.ts - Update all imports --- tests/engine/app/external-link.test.ts | 2 +- tests/engine/tauri/document-io.test.ts | 2 +- tests/engine/tauri/fig-export.test.ts | 2 +- tests/engine/tauri/file-actions.test.ts | 2 +- tests/engine/tauri/font-cache.test.ts | 2 +- tests/engine/tauri/fonts.test.ts | 2 +- tests/engine/tauri/processes.test.ts | 2 +- tests/engine/tauri/remaining-integrations.test.ts | 2 +- .../fig-export-fixture.ts} | 0 tests/helpers/{tauri-mocks.ts => tauri/mocks.ts} | 0 10 files changed, 8 insertions(+), 8 deletions(-) rename tests/helpers/{tauri-fig-export-fixture.ts => tauri/fig-export-fixture.ts} (100%) rename tests/helpers/{tauri-mocks.ts => tauri/mocks.ts} (100%) diff --git a/tests/engine/app/external-link.test.ts b/tests/engine/app/external-link.test.ts index 0cd33e48a..681075e32 100644 --- a/tests/engine/app/external-link.test.ts +++ b/tests/engine/app/external-link.test.ts @@ -2,7 +2,7 @@ import { describe, test, expect, vi, beforeEach, afterEach } from 'bun:test' import { openExternalLink } from '@/app/shell/ui' -import { clearTauriMocks, mockTauriIPC } from '#tests/helpers/tauri-mocks' +import { clearTauriMocks, mockTauriIPC } from '#tests/helpers/tauri/mocks' /** * Tests for the browser (window.open) path only. diff --git a/tests/engine/tauri/document-io.test.ts b/tests/engine/tauri/document-io.test.ts index 2c325305c..7c32d898e 100644 --- a/tests/engine/tauri/document-io.test.ts +++ b/tests/engine/tauri/document-io.test.ts @@ -4,7 +4,7 @@ import { readReloadSource } from '@/app/document/io/reload-source' import { chooseTauriFigSavePath } from '@/app/document/io/save-targets' import { createDocumentWriter } from '@/app/document/io/write' -import { clearTauriMocks, mockTauriIPC } from '#tests/helpers/tauri-mocks' +import { clearTauriMocks, mockTauriIPC } from '#tests/helpers/tauri/mocks' afterEach(async () => { await clearTauriMocks() diff --git a/tests/engine/tauri/fig-export.test.ts b/tests/engine/tauri/fig-export.test.ts index dadeac3a8..fa8d866ed 100644 --- a/tests/engine/tauri/fig-export.test.ts +++ b/tests/engine/tauri/fig-export.test.ts @@ -2,7 +2,7 @@ import { describe, expect, test } from 'bun:test' describe('Tauri fig export', () => { test('delegates fig archive construction to the Tauri Rust command', async () => { - const proc = Bun.spawn(['bun', 'tests/helpers/tauri-fig-export-fixture.ts'], { + const proc = Bun.spawn(['bun', 'tests/helpers/tauri/fig-export-fixture.ts'], { stdout: 'pipe', stderr: 'pipe' }) diff --git a/tests/engine/tauri/file-actions.test.ts b/tests/engine/tauri/file-actions.test.ts index f0910e886..ffa023daf 100644 --- a/tests/engine/tauri/file-actions.test.ts +++ b/tests/engine/tauri/file-actions.test.ts @@ -4,7 +4,7 @@ import { saveExportedFile } from '@/app/document/export/files' import { watchTauriFile } from '@/app/document/io/watch-targets' import { chooseTauriOpenPath, readTauriDesignFile } from '@/app/shell/menu/files' -import { clearTauriMocks, mockTauriIPC } from '#tests/helpers/tauri-mocks' +import { clearTauriMocks, mockTauriIPC } from '#tests/helpers/tauri/mocks' afterEach(async () => { await clearTauriMocks() diff --git a/tests/engine/tauri/font-cache.test.ts b/tests/engine/tauri/font-cache.test.ts index 1095ce760..66f283c80 100644 --- a/tests/engine/tauri/font-cache.test.ts +++ b/tests/engine/tauri/font-cache.test.ts @@ -2,7 +2,7 @@ import { afterEach, describe, expect, test } from 'bun:test' import { clearDownloadedFontCache, downloadedFontCacheSummary } from '@/app/editor/fonts/cache' -import { clearTauriMocks, mockTauriIPC } from '#tests/helpers/tauri-mocks' +import { clearTauriMocks, mockTauriIPC } from '#tests/helpers/tauri/mocks' const encoder = new TextEncoder() diff --git a/tests/engine/tauri/fonts.test.ts b/tests/engine/tauri/fonts.test.ts index a8d7427a2..ac141b282 100644 --- a/tests/engine/tauri/fonts.test.ts +++ b/tests/engine/tauri/fonts.test.ts @@ -2,7 +2,7 @@ import { afterEach, describe, expect, test, vi } from 'bun:test' import { fontManager } from '@open-pencil/core/text' -import { clearTauriMocks, mockTauriIPC } from '#tests/helpers/tauri-mocks' +import { clearTauriMocks, mockTauriIPC } from '#tests/helpers/tauri/mocks' class MockFontFace { family: string diff --git a/tests/engine/tauri/processes.test.ts b/tests/engine/tauri/processes.test.ts index 36dec040c..0d990db78 100644 --- a/tests/engine/tauri/processes.test.ts +++ b/tests/engine/tauri/processes.test.ts @@ -5,7 +5,7 @@ import { ref } from 'vue' import { spawnAcpProcess } from '@/app/ai/acp/process' import { checkForAppUpdate } from '@/app/shell/updater' -import { clearTauriMocks, mockTauriIPC } from '#tests/helpers/tauri-mocks' +import { clearTauriMocks, mockTauriIPC } from '#tests/helpers/tauri/mocks' afterEach(async () => { await clearTauriMocks() diff --git a/tests/engine/tauri/remaining-integrations.test.ts b/tests/engine/tauri/remaining-integrations.test.ts index 2df00c7b5..51af2b996 100644 --- a/tests/engine/tauri/remaining-integrations.test.ts +++ b/tests/engine/tauri/remaining-integrations.test.ts @@ -5,7 +5,7 @@ import { createACPTransport } from '@/app/ai/chat/transports' import { ensureTauriParentDirectory } from '@/app/automation/bridge/file-handlers' import { spawnMCPIfNeeded } from '@/app/automation/mcp/spawn' -import { clearTauriMocks, installTauriMockWindow, mockTauriIPC } from '#tests/helpers/tauri-mocks' +import { clearTauriMocks, installTauriMockWindow, mockTauriIPC } from '#tests/helpers/tauri/mocks' afterEach(async () => { await clearTauriMocks() diff --git a/tests/helpers/tauri-fig-export-fixture.ts b/tests/helpers/tauri/fig-export-fixture.ts similarity index 100% rename from tests/helpers/tauri-fig-export-fixture.ts rename to tests/helpers/tauri/fig-export-fixture.ts diff --git a/tests/helpers/tauri-mocks.ts b/tests/helpers/tauri/mocks.ts similarity index 100% rename from tests/helpers/tauri-mocks.ts rename to tests/helpers/tauri/mocks.ts