diff --git a/scripts/sync-changelog.mjs b/.github/scripts/sync-changelog.mjs similarity index 100% rename from scripts/sync-changelog.mjs rename to .github/scripts/sync-changelog.mjs diff --git a/.github/workflows/sync-changelog.yml b/.github/workflows/sync-changelog.yml index dcc00c0b3..88ac8a6c5 100644 --- a/.github/workflows/sync-changelog.yml +++ b/.github/workflows/sync-changelog.yml @@ -20,7 +20,7 @@ jobs: node-version: 22 - name: Generate changelog JSON - run: node scripts/sync-changelog.mjs + run: node .github/scripts/sync-changelog.mjs env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }} diff --git a/package.json b/package.json index 20f57e914..978efd822 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,8 @@ "check": "oxfmt --check \"src/**/*.{ts,vue}\" && pnpm lint && vue-tsc --noEmit && pnpm test", "lint": "oxlint --vue-plugin src", "fmt": "oxfmt \"src/**/*.{ts,vue}\"", - "test": "tsx --test tests/*.test.ts", - "test:coverage": "c8 --reporter=lcov --reporter=text tsx --test tests/*.test.ts", + "test": "tsx --test packages/app-tests/*.test.ts", + "test:coverage": "c8 --reporter=lcov --reporter=text tsx --test packages/app-tests/*.test.ts", "preview": "vite preview", "tauri": "tauri", "prepare": "husky" diff --git a/tests/actionActivation.test.ts b/packages/app-tests/actionActivation.test.ts similarity index 95% rename from tests/actionActivation.test.ts rename to packages/app-tests/actionActivation.test.ts index 9cddba39a..2c20606f4 100644 --- a/tests/actionActivation.test.ts +++ b/packages/app-tests/actionActivation.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { shouldSuppressRepeatedActivation, tryStartExclusiveActivation } from "../src/lib/actionActivation.ts"; +import { shouldSuppressRepeatedActivation, tryStartExclusiveActivation } from "../../src/lib/actionActivation.ts"; test("allows the first activation", () => { const guard = {}; diff --git a/tests/agentDriverInstallHint.test.ts b/packages/app-tests/agentDriverInstallHint.test.ts similarity index 92% rename from tests/agentDriverInstallHint.test.ts rename to packages/app-tests/agentDriverInstallHint.test.ts index 2ab7fdb72..39168557c 100644 --- a/tests/agentDriverInstallHint.test.ts +++ b/packages/app-tests/agentDriverInstallHint.test.ts @@ -1,6 +1,6 @@ import assert from "node:assert/strict"; import test from "node:test"; -import { showAgentDriverInstallHint } from "../src/lib/agentDriverInstallHint.ts"; +import { showAgentDriverInstallHint } from "../../src/lib/agentDriverInstallHint.ts"; test("hides the agent driver install hint when the selected driver is installed", () => { assert.equal(showAgentDriverInstallHint("informix", [{ db_type: "informix", installed: true }]), false); diff --git a/tests/agentDriverUpdateBadge.test.ts b/packages/app-tests/agentDriverUpdateBadge.test.ts similarity index 85% rename from tests/agentDriverUpdateBadge.test.ts rename to packages/app-tests/agentDriverUpdateBadge.test.ts index 0afce9e91..0a4ae2f34 100644 --- a/tests/agentDriverUpdateBadge.test.ts +++ b/packages/app-tests/agentDriverUpdateBadge.test.ts @@ -1,7 +1,7 @@ import assert from "node:assert/strict"; import test from "node:test"; -import { countAvailableAgentDriverUpdates } from "../src/lib/agentDriverUpdateBadge.ts"; +import { countAvailableAgentDriverUpdates } from "../../src/lib/agentDriverUpdateBadge.ts"; test("returns zero when there are no available agent driver updates", () => { assert.equal(countAvailableAgentDriverUpdates([]), 0); diff --git a/tests/aiAgentPlan.test.ts b/packages/app-tests/aiAgentPlan.test.ts similarity index 96% rename from tests/aiAgentPlan.test.ts rename to packages/app-tests/aiAgentPlan.test.ts index 874b47b58..810b76464 100644 --- a/tests/aiAgentPlan.test.ts +++ b/packages/app-tests/aiAgentPlan.test.ts @@ -1,8 +1,8 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { buildAiAgentPlan } from "../src/lib/aiAgentPlan.ts"; -import type { AiAction, AiAssistantMode } from "../src/lib/ai.ts"; -import type { ConnectionConfig } from "../src/types/database.ts"; +import { buildAiAgentPlan } from "../../src/lib/aiAgentPlan.ts"; +import type { AiAction, AiAssistantMode } from "../../src/lib/ai.ts"; +import type { ConnectionConfig } from "../../src/types/database.ts"; function conn(overrides: Partial = {}): ConnectionConfig { return { diff --git a/tests/aiAgentStepPresentation.test.ts b/packages/app-tests/aiAgentStepPresentation.test.ts similarity index 96% rename from tests/aiAgentStepPresentation.test.ts rename to packages/app-tests/aiAgentStepPresentation.test.ts index 1cadbeaa4..74541ffed 100644 --- a/tests/aiAgentStepPresentation.test.ts +++ b/packages/app-tests/aiAgentStepPresentation.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { buildAiAgentStepItems } from "../src/lib/aiAgentStepPresentation.ts"; -import type { AiAgentPlan } from "../src/lib/aiAgentPlan.ts"; +import { buildAiAgentStepItems } from "../../src/lib/aiAgentStepPresentation.ts"; +import type { AiAgentPlan } from "../../src/lib/aiAgentPlan.ts"; test("presents auto-execute agent plans as completed generation, safety, and execution steps", () => { const plan: AiAgentPlan = { diff --git a/tests/aiPrompt.test.ts b/packages/app-tests/aiPrompt.test.ts similarity index 95% rename from tests/aiPrompt.test.ts rename to packages/app-tests/aiPrompt.test.ts index e2c3fb819..5e4691fca 100644 --- a/tests/aiPrompt.test.ts +++ b/packages/app-tests/aiPrompt.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import type { AiContext } from "../src/lib/ai.ts"; +import type { AiContext } from "../../src/lib/ai.ts"; class MemoryStorage { private values = new Map(); @@ -27,7 +27,7 @@ Object.defineProperty(globalThis, "localStorage", { configurable: true, }); -const { buildSystemPrompt } = await import("../src/lib/ai.ts"); +const { buildSystemPrompt } = await import("../../src/lib/ai.ts"); function context(overrides: Partial = {}): AiContext { return { diff --git a/tests/aiPromptEval.test.ts b/packages/app-tests/aiPromptEval.test.ts similarity index 97% rename from tests/aiPromptEval.test.ts rename to packages/app-tests/aiPromptEval.test.ts index 9f4f8ef01..eba358179 100644 --- a/tests/aiPromptEval.test.ts +++ b/packages/app-tests/aiPromptEval.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import type { AiAction, AiAssistantMode, AiContext } from "../src/lib/ai.ts"; +import type { AiAction, AiAssistantMode, AiContext } from "../../src/lib/ai.ts"; class MemoryStorage { private values = new Map(); @@ -27,7 +27,7 @@ Object.defineProperty(globalThis, "localStorage", { configurable: true, }); -const { buildSystemPrompt } = await import("../src/lib/ai.ts"); +const { buildSystemPrompt } = await import("../../src/lib/ai.ts"); function baseContext(overrides: Partial = {}): AiContext { return { diff --git a/tests/aiSkills.test.ts b/packages/app-tests/aiSkills.test.ts similarity index 92% rename from tests/aiSkills.test.ts rename to packages/app-tests/aiSkills.test.ts index e14fae042..8fd47942e 100644 --- a/tests/aiSkills.test.ts +++ b/packages/app-tests/aiSkills.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import type { AiAction } from "../src/lib/ai.ts"; -import { AI_SKILL_DEFINITIONS, aiSkillForAction } from "../src/lib/aiSkills.ts"; +import type { AiAction } from "../../src/lib/ai.ts"; +import { AI_SKILL_DEFINITIONS, aiSkillForAction } from "../../src/lib/aiSkills.ts"; const actions: AiAction[] = ["generate", "explain", "optimize", "fix", "convert", "sampleData"]; diff --git a/tests/aiSqlExecutionPolicy.test.ts b/packages/app-tests/aiSqlExecutionPolicy.test.ts similarity index 97% rename from tests/aiSqlExecutionPolicy.test.ts rename to packages/app-tests/aiSqlExecutionPolicy.test.ts index 3f6783693..bc540a57d 100644 --- a/tests/aiSqlExecutionPolicy.test.ts +++ b/packages/app-tests/aiSqlExecutionPolicy.test.ts @@ -4,8 +4,8 @@ import { classifyAiSqlExecution, classifyConnectionEnvironment, shouldAttemptAiAutoExecute, -} from "../src/lib/aiSqlExecutionPolicy.ts"; -import type { ConnectionConfig } from "../src/types/database.ts"; +} from "../../src/lib/aiSqlExecutionPolicy.ts"; +import type { ConnectionConfig } from "../../src/types/database.ts"; function conn(overrides: Partial = {}): ConnectionConfig { return { diff --git a/tests/aiTableMentions.test.ts b/packages/app-tests/aiTableMentions.test.ts similarity index 92% rename from tests/aiTableMentions.test.ts rename to packages/app-tests/aiTableMentions.test.ts index f7985615d..4b3aefa51 100644 --- a/tests/aiTableMentions.test.ts +++ b/packages/app-tests/aiTableMentions.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { formatAiTableMention, parseAiTableMentions } from "../src/lib/aiTableMentions.ts"; +import { formatAiTableMention, parseAiTableMentions } from "../../src/lib/aiTableMentions.ts"; test("parses simple and schema-qualified AI table mentions", () => { assert.deepEqual(parseAiTableMentions("show @users and join @public.orders"), [ diff --git a/tests/apiBackendContract.test.ts b/packages/app-tests/apiBackendContract.test.ts similarity index 100% rename from tests/apiBackendContract.test.ts rename to packages/app-tests/apiBackendContract.test.ts diff --git a/tests/appTheme.test.ts b/packages/app-tests/appTheme.test.ts similarity index 96% rename from tests/appTheme.test.ts rename to packages/app-tests/appTheme.test.ts index 8195bca99..c1bf9ebf9 100644 --- a/tests/appTheme.test.ts +++ b/packages/app-tests/appTheme.test.ts @@ -4,7 +4,7 @@ import { getTauriThemeForMode, normalizeAppThemeMode, resolveAppThemeAppearance, -} from "../src/lib/appTheme.ts"; +} from "../../src/lib/appTheme.ts"; test("normalizes stored app theme modes", () => { assert.equal(normalizeAppThemeMode("dark"), "dark"); diff --git a/tests/appUpdateBadge.test.ts b/packages/app-tests/appUpdateBadge.test.ts similarity index 100% rename from tests/appUpdateBadge.test.ts rename to packages/app-tests/appUpdateBadge.test.ts diff --git a/tests/cellValue.test.ts b/packages/app-tests/cellValue.test.ts similarity index 97% rename from tests/cellValue.test.ts rename to packages/app-tests/cellValue.test.ts index c35fc063c..9f7dd1472 100644 --- a/tests/cellValue.test.ts +++ b/packages/app-tests/cellValue.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { displayCellValue } from "../src/lib/cellValue.ts"; +import { displayCellValue } from "../../src/lib/cellValue.ts"; test("displayCellValue returns NULL for null", () => { assert.equal(displayCellValue(null), "NULL"); diff --git a/tests/columnFormatter.test.ts b/packages/app-tests/columnFormatter.test.ts similarity index 98% rename from tests/columnFormatter.test.ts rename to packages/app-tests/columnFormatter.test.ts index 02f0ed416..55a20ea85 100644 --- a/tests/columnFormatter.test.ts +++ b/packages/app-tests/columnFormatter.test.ts @@ -6,7 +6,7 @@ import { resolveColumnFormatter, normalizeColumnFormatter, type ColumnFormatterConfig, -} from "../src/lib/columnFormatter.ts"; +} from "../../src/lib/columnFormatter.ts"; test("formats unix timestamps in seconds, milliseconds, and auto mode", () => { assert.equal( diff --git a/tests/configCrypto.test.ts b/packages/app-tests/configCrypto.test.ts similarity index 97% rename from tests/configCrypto.test.ts rename to packages/app-tests/configCrypto.test.ts index 98fac1cc1..77d67922f 100644 --- a/tests/configCrypto.test.ts +++ b/packages/app-tests/configCrypto.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { encryptConfig, decryptConfig, isEncryptedConfig } from "../src/lib/configCrypto.ts"; +import { encryptConfig, decryptConfig, isEncryptedConfig } from "../../src/lib/configCrypto.ts"; test("encrypts and decrypts config round-trip", async () => { const original = JSON.stringify([{ id: "1", name: "test", password: "secret123" }]); diff --git a/tests/connectionHealth.test.ts b/packages/app-tests/connectionHealth.test.ts similarity index 96% rename from tests/connectionHealth.test.ts rename to packages/app-tests/connectionHealth.test.ts index 46948f4e9..d344a4523 100644 --- a/tests/connectionHealth.test.ts +++ b/packages/app-tests/connectionHealth.test.ts @@ -1,6 +1,6 @@ import assert from "node:assert/strict"; import test from "node:test"; -import { staleConnectionMessage, shouldMarkDisconnected } from "../src/lib/connectionHealth.ts"; +import { staleConnectionMessage, shouldMarkDisconnected } from "../../src/lib/connectionHealth.ts"; test("metadata connection errors should turn off connected state", () => { assert.equal(shouldMarkDisconnected(new Error("connection closed by server")), true); diff --git a/tests/connectionPresentation.test.ts b/packages/app-tests/connectionPresentation.test.ts similarity index 90% rename from tests/connectionPresentation.test.ts rename to packages/app-tests/connectionPresentation.test.ts index 27e49576c..6962a2b78 100644 --- a/tests/connectionPresentation.test.ts +++ b/packages/app-tests/connectionPresentation.test.ts @@ -1,7 +1,7 @@ import test from "node:test"; import assert from "node:assert/strict"; -import type { ConnectionConfig } from "../src/types/database.ts"; -import { connectionDriverLabel, connectionEndpointLabel, connectionIconType, connectionOptionSubtitle } from "../src/lib/connectionPresentation.ts"; +import type { ConnectionConfig } from "../../src/types/database.ts"; +import { connectionDriverLabel, connectionEndpointLabel, connectionIconType, connectionOptionSubtitle } from "../../src/lib/connectionPresentation.ts"; const baseConnection: ConnectionConfig = { id: "conn-1", diff --git a/tests/connectionUrl.test.ts b/packages/app-tests/connectionUrl.test.ts similarity index 98% rename from tests/connectionUrl.test.ts rename to packages/app-tests/connectionUrl.test.ts index 355dcf416..cbc36dd07 100644 --- a/tests/connectionUrl.test.ts +++ b/packages/app-tests/connectionUrl.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { parseConnectionUrl } from "../src/lib/connectionUrl.ts"; +import { parseConnectionUrl } from "../../src/lib/connectionUrl.ts"; test("parses postgres connection URLs", () => { assert.deepEqual(parseConnectionUrl("postgresql://alice:secret@db.example.com:5433/app?sslmode=require"), { diff --git a/tests/connectionUrlPlaceholder.test.ts b/packages/app-tests/connectionUrlPlaceholder.test.ts similarity index 96% rename from tests/connectionUrlPlaceholder.test.ts rename to packages/app-tests/connectionUrlPlaceholder.test.ts index f322b6fc7..2397d41b6 100644 --- a/tests/connectionUrlPlaceholder.test.ts +++ b/packages/app-tests/connectionUrlPlaceholder.test.ts @@ -1,6 +1,6 @@ import test from "node:test"; import assert from "node:assert/strict"; -import { connectionUrlPlaceholder } from "../src/lib/connectionPresentation.ts"; +import { connectionUrlPlaceholder } from "../../src/lib/connectionPresentation.ts"; const expected: Record = { mysql: "mysql://user:password@host:port/database", diff --git a/tests/createDatabaseSql.test.ts b/packages/app-tests/createDatabaseSql.test.ts similarity index 96% rename from tests/createDatabaseSql.test.ts rename to packages/app-tests/createDatabaseSql.test.ts index 7cfcc2d91..1bfd3647b 100644 --- a/tests/createDatabaseSql.test.ts +++ b/packages/app-tests/createDatabaseSql.test.ts @@ -1,6 +1,6 @@ import assert from "node:assert/strict"; import test from "node:test"; -import { buildCreateDatabaseSql, supportsCreateDatabaseCharset } from "../src/lib/createDatabaseSql.ts"; +import { buildCreateDatabaseSql, supportsCreateDatabaseCharset } from "../../src/lib/createDatabaseSql.ts"; test("builds MySQL create database SQL with charset and collation", () => { assert.equal( diff --git a/tests/dataCompare.test.ts b/packages/app-tests/dataCompare.test.ts similarity index 96% rename from tests/dataCompare.test.ts rename to packages/app-tests/dataCompare.test.ts index 70fcfab74..0f9cf7757 100644 --- a/tests/dataCompare.test.ts +++ b/packages/app-tests/dataCompare.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { compareDataRows, generateDataSyncSql } from "../src/lib/dataCompare.ts"; +import { compareDataRows, generateDataSyncSql } from "../../src/lib/dataCompare.ts"; test("compares rows by primary key and reports added, removed, and modified rows", () => { const diff = compareDataRows({ diff --git a/tests/dataGridColumnWidth.test.ts b/packages/app-tests/dataGridColumnWidth.test.ts similarity index 93% rename from tests/dataGridColumnWidth.test.ts rename to packages/app-tests/dataGridColumnWidth.test.ts index a500bf531..e7ee87209 100644 --- a/tests/dataGridColumnWidth.test.ts +++ b/packages/app-tests/dataGridColumnWidth.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { calculateDataGridColumnWidth, DATA_GRID_HEADER_CONTROL_WIDTH } from "../src/lib/dataGridColumnWidth.ts"; +import { calculateDataGridColumnWidth, DATA_GRID_HEADER_CONTROL_WIDTH } from "../../src/lib/dataGridColumnWidth.ts"; test("reserves header control space when auto-sizing a column from the header", () => { const width = calculateDataGridColumnWidth({ diff --git a/tests/dataGridEditor.test.ts b/packages/app-tests/dataGridEditor.test.ts similarity index 98% rename from tests/dataGridEditor.test.ts rename to packages/app-tests/dataGridEditor.test.ts index 1d5d3b765..8cbac2344 100644 --- a/tests/dataGridEditor.test.ts +++ b/packages/app-tests/dataGridEditor.test.ts @@ -2,8 +2,8 @@ import { strict as assert } from "node:assert"; import test from "node:test"; import { computed, nextTick, ref } from "vue"; import { createPinia, setActivePinia } from "pinia"; -import { useDataGridEditor } from "../src/composables/useDataGridEditor.ts"; -import type { ColumnInfo } from "../src/types/database.ts"; +import { useDataGridEditor } from "../../src/composables/useDataGridEditor.ts"; +import type { ColumnInfo } from "../../src/types/database.ts"; type CellValue = string | number | boolean | null; diff --git a/tests/dataGridScrollGutter.test.ts b/packages/app-tests/dataGridScrollGutter.test.ts similarity index 93% rename from tests/dataGridScrollGutter.test.ts rename to packages/app-tests/dataGridScrollGutter.test.ts index 3564f3a28..b04150dcd 100644 --- a/tests/dataGridScrollGutter.test.ts +++ b/packages/app-tests/dataGridScrollGutter.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { dataGridHeaderContentWidth, scrollbarGutterWidth } from "../src/lib/dataGridScrollGutter.ts"; +import { dataGridHeaderContentWidth, scrollbarGutterWidth } from "../../src/lib/dataGridScrollGutter.ts"; test("calculates scrollbar gutter from element dimensions", () => { assert.equal(scrollbarGutterWidth({ offsetWidth: 1000, clientWidth: 985 }), 15); diff --git a/tests/dataGridSql.test.ts b/packages/app-tests/dataGridSql.test.ts similarity index 99% rename from tests/dataGridSql.test.ts rename to packages/app-tests/dataGridSql.test.ts index c888ae538..09c3b35d7 100644 --- a/tests/dataGridSql.test.ts +++ b/packages/app-tests/dataGridSql.test.ts @@ -7,8 +7,8 @@ import { normalizeDataGridSaveError, formatGridSqlLiteral, validateDataGridSave, -} from "../src/lib/dataGridSql.ts"; -import { DBX_NEO4J_ELEMENT_ID_COLUMN } from "../src/lib/tableEditing.ts"; +} from "../../src/lib/dataGridSql.ts"; +import { DBX_NEO4J_ELEMENT_ID_COLUMN } from "../../src/lib/tableEditing.ts"; test("builds SQL Server grid save statements with schema and bracket quoting", () => { const statements = buildDataGridSaveStatements({ diff --git a/tests/dataGridTranspose.test.ts b/packages/app-tests/dataGridTranspose.test.ts similarity index 98% rename from tests/dataGridTranspose.test.ts rename to packages/app-tests/dataGridTranspose.test.ts index b517a8723..cc9b9da16 100644 --- a/tests/dataGridTranspose.test.ts +++ b/packages/app-tests/dataGridTranspose.test.ts @@ -7,7 +7,7 @@ import { transposeFieldWidth, transposeScrollLeftForRecord, visibleTransposeRecordWindow, -} from "../src/lib/dataGridTranspose.ts"; +} from "../../src/lib/dataGridTranspose.ts"; test("row number double click opens transpose for a row", () => { assert.deepEqual(nextTransposeState(false, null, 2), { diff --git a/tests/databaseCapabilities.test.ts b/packages/app-tests/databaseCapabilities.test.ts similarity index 98% rename from tests/databaseCapabilities.test.ts rename to packages/app-tests/databaseCapabilities.test.ts index 34c2cad74..0a05651fe 100644 --- a/tests/databaseCapabilities.test.ts +++ b/packages/app-tests/databaseCapabilities.test.ts @@ -18,7 +18,7 @@ import { supportsTransfer, usesPostgresLikeStructureCopy, usesTreeSchemaMode, -} from "../src/lib/databaseCapabilities.ts"; +} from "../../src/lib/databaseCapabilities.ts"; test("treats Trino catalogs as schema tree roots", () => { assert.equal(TREE_SCHEMA_TYPES.has("trino"), true); diff --git a/tests/databaseExport.test.ts b/packages/app-tests/databaseExport.test.ts similarity index 98% rename from tests/databaseExport.test.ts rename to packages/app-tests/databaseExport.test.ts index 4c4e465d1..61a2be9c5 100644 --- a/tests/databaseExport.test.ts +++ b/packages/app-tests/databaseExport.test.ts @@ -7,7 +7,7 @@ import { buildDatabaseSqlExport, buildInsertStatements, formatSqlLiteral, -} from "../src/lib/databaseExport.ts"; +} from "../../src/lib/databaseExport.ts"; test("formats SQL literals for exported INSERT statements", () => { assert.equal(formatSqlLiteral(null), "NULL"); diff --git a/tests/databaseExportSelection.test.ts b/packages/app-tests/databaseExportSelection.test.ts similarity index 87% rename from tests/databaseExportSelection.test.ts rename to packages/app-tests/databaseExportSelection.test.ts index b546b5018..60f6678c7 100644 --- a/tests/databaseExportSelection.test.ts +++ b/packages/app-tests/databaseExportSelection.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { buildSelectedTablesPayload } from "../src/lib/databaseExportSelection.ts"; +import { buildSelectedTablesPayload } from "../../src/lib/databaseExportSelection.ts"; test("omits selected table payload when every table is selected", () => { assert.equal(buildSelectedTablesPayload(["users", "orders"], ["users", "orders"]), undefined); diff --git a/tests/databaseOptionSearch.test.ts b/packages/app-tests/databaseOptionSearch.test.ts similarity index 89% rename from tests/databaseOptionSearch.test.ts rename to packages/app-tests/databaseOptionSearch.test.ts index b2be3c307..f9d6e6aa8 100644 --- a/tests/databaseOptionSearch.test.ts +++ b/packages/app-tests/databaseOptionSearch.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { filterDatabaseOptions } from "../src/lib/databaseOptionSearch.ts"; +import { filterDatabaseOptions } from "../../src/lib/databaseOptionSearch.ts"; test("returns all database options when the search query is empty", () => { assert.deepEqual(filterDatabaseOptions(["app", "analytics"], ""), ["app", "analytics"]); diff --git a/tests/databaseSearch.test.ts b/packages/app-tests/databaseSearch.test.ts similarity index 95% rename from tests/databaseSearch.test.ts rename to packages/app-tests/databaseSearch.test.ts index 8c334ccac..e2f45209d 100644 --- a/tests/databaseSearch.test.ts +++ b/packages/app-tests/databaseSearch.test.ts @@ -1,11 +1,11 @@ import test from "node:test"; import assert from "node:assert/strict"; -import type { ColumnInfo } from "../src/types/database.ts"; +import type { ColumnInfo } from "../../src/types/database.ts"; import { buildDatabaseSearchSql, buildSearchResultWhere, findMatchedSearchColumns, -} from "../src/lib/databaseSearch.ts"; +} from "../../src/lib/databaseSearch.ts"; function col(name: string, dataType: string, primary = false): ColumnInfo { return { diff --git a/tests/databaseTree.test.ts b/packages/app-tests/databaseTree.test.ts similarity index 87% rename from tests/databaseTree.test.ts rename to packages/app-tests/databaseTree.test.ts index 581e30c1b..6a509408f 100644 --- a/tests/databaseTree.test.ts +++ b/packages/app-tests/databaseTree.test.ts @@ -1,6 +1,6 @@ import assert from "node:assert/strict"; import test from "node:test"; -import { buildDatabaseTreeNodes } from "../src/lib/databaseTree.ts"; +import { buildDatabaseTreeNodes } from "../../src/lib/databaseTree.ts"; test("设置默认库后侧边栏数据库树仍保留全部数据库", () => { const nodes = buildDatabaseTreeNodes("conn-1", [ diff --git a/tests/defaultDatabase.test.ts b/packages/app-tests/defaultDatabase.test.ts similarity index 90% rename from tests/defaultDatabase.test.ts rename to packages/app-tests/defaultDatabase.test.ts index 02e6115c3..d56536da4 100644 --- a/tests/defaultDatabase.test.ts +++ b/packages/app-tests/defaultDatabase.test.ts @@ -1,6 +1,6 @@ import assert from "node:assert/strict"; import test from "node:test"; -import { isDefaultDatabase, resolveDefaultDatabase } from "../src/lib/defaultDatabase.ts"; +import { isDefaultDatabase, resolveDefaultDatabase } from "../../src/lib/defaultDatabase.ts"; test("优先使用连接上已保存的默认数据库", () => { assert.equal(resolveDefaultDatabase({ database: "analytics" }, ["app", "analytics"]), "analytics"); diff --git a/tests/diagramSvgExport.test.ts b/packages/app-tests/diagramSvgExport.test.ts similarity index 94% rename from tests/diagramSvgExport.test.ts rename to packages/app-tests/diagramSvgExport.test.ts index 1feaa9c19..0d22fa24a 100644 --- a/tests/diagramSvgExport.test.ts +++ b/packages/app-tests/diagramSvgExport.test.ts @@ -1,12 +1,12 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { buildEngineeringDiagram } from "../src/lib/engineeringDiagram.ts"; +import { buildEngineeringDiagram } from "../../src/lib/engineeringDiagram.ts"; import { buildEngineeringDiagramSvg, buildTableDiagramSvg, diagramSvgFileName, -} from "../src/lib/diagramSvgExport.ts"; -import { buildDiagramRelationships, type DiagramTable } from "../src/lib/erDiagram.ts"; +} from "../../src/lib/diagramSvgExport.ts"; +import { buildDiagramRelationships, type DiagramTable } from "../../src/lib/erDiagram.ts"; const tables: DiagramTable[] = [ { diff --git a/tests/diagramZoom.test.ts b/packages/app-tests/diagramZoom.test.ts similarity index 94% rename from tests/diagramZoom.test.ts rename to packages/app-tests/diagramZoom.test.ts index c552b8523..dc50b59cc 100644 --- a/tests/diagramZoom.test.ts +++ b/packages/app-tests/diagramZoom.test.ts @@ -4,7 +4,7 @@ import { clampDiagramZoom, zoomFromGestureScale, zoomFromWheelDelta, -} from "../src/lib/diagramZoom.ts"; +} from "../../src/lib/diagramZoom.ts"; test("clamps diagram zoom to supported bounds", () => { assert.equal(clampDiagramZoom(0.2), 0.6); diff --git a/tests/docsReleaseIntegration.test.ts b/packages/app-tests/docsReleaseIntegration.test.ts similarity index 96% rename from tests/docsReleaseIntegration.test.ts rename to packages/app-tests/docsReleaseIntegration.test.ts index 6a029a039..b957eba01 100644 --- a/tests/docsReleaseIntegration.test.ts +++ b/packages/app-tests/docsReleaseIntegration.test.ts @@ -1,8 +1,8 @@ import { readFileSync } from "node:fs"; import { strict as assert } from "node:assert"; import test from "node:test"; -import appPackage from "../package.json" with { type: "json" }; -import downloadLinks from "../docs/lib/downloadLinks.ts"; +import appPackage from "../../package.json" with { type: "json" }; +import downloadLinks from "../../docs/lib/downloadLinks.ts"; const { createInstallOptions } = downloadLinks; diff --git a/tests/engineeringDiagram.test.ts b/packages/app-tests/engineeringDiagram.test.ts similarity index 95% rename from tests/engineeringDiagram.test.ts rename to packages/app-tests/engineeringDiagram.test.ts index 047d11b91..4e2b36d11 100644 --- a/tests/engineeringDiagram.test.ts +++ b/packages/app-tests/engineeringDiagram.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { buildEngineeringDiagram } from "../src/lib/engineeringDiagram.ts"; -import type { DiagramRelationship, DiagramTable } from "../src/lib/erDiagram.ts"; +import { buildEngineeringDiagram } from "../../src/lib/engineeringDiagram.ts"; +import type { DiagramRelationship, DiagramTable } from "../../src/lib/erDiagram.ts"; const tables: DiagramTable[] = [ { diff --git a/tests/erDiagram.test.ts b/packages/app-tests/erDiagram.test.ts similarity index 98% rename from tests/erDiagram.test.ts rename to packages/app-tests/erDiagram.test.ts index ac75084be..fb92e5bcd 100644 --- a/tests/erDiagram.test.ts +++ b/packages/app-tests/erDiagram.test.ts @@ -4,7 +4,7 @@ import { buildDiagramRelationships, filterDiagramTables, layoutDiagramTables, -} from "../src/lib/erDiagram.ts"; +} from "../../src/lib/erDiagram.ts"; test("builds relationships only between tables in the diagram", () => { const relationships = buildDiagramRelationships([ diff --git a/tests/explainPlan.test.ts b/packages/app-tests/explainPlan.test.ts similarity index 98% rename from tests/explainPlan.test.ts rename to packages/app-tests/explainPlan.test.ts index b43916ecd..cf7b2cc47 100644 --- a/tests/explainPlan.test.ts +++ b/packages/app-tests/explainPlan.test.ts @@ -5,7 +5,7 @@ import { flattenExplainPlanNodes, parseExplainResult, supportsExplainPlan, -} from "../src/lib/explainPlan.ts"; +} from "../../src/lib/explainPlan.ts"; test("builds PostgreSQL JSON explain SQL from a selected query", () => { const result = buildExplainSql("postgres", " select * from users where id = 1; "); diff --git a/tests/fieldLineage.test.ts b/packages/app-tests/fieldLineage.test.ts similarity index 98% rename from tests/fieldLineage.test.ts rename to packages/app-tests/fieldLineage.test.ts index 7b4c0d4f0..59167952a 100644 --- a/tests/fieldLineage.test.ts +++ b/packages/app-tests/fieldLineage.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { analyzeFieldLineage, identifierInSql, summarizeLineageCounts } from "../src/lib/fieldLineage.ts"; +import { analyzeFieldLineage, identifierInSql, summarizeLineageCounts } from "../../src/lib/fieldLineage.ts"; test("detects outgoing and incoming foreign key lineage as certain", () => { const result = analyzeFieldLineage({ diff --git a/tests/gridRowStatus.test.ts b/packages/app-tests/gridRowStatus.test.ts similarity index 95% rename from tests/gridRowStatus.test.ts rename to packages/app-tests/gridRowStatus.test.ts index d59d5eb14..21a5ed747 100644 --- a/tests/gridRowStatus.test.ts +++ b/packages/app-tests/gridRowStatus.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { matchesRowStatusFilter, rowStatusFilterAfterAddingRow, type RowStatus } from "../src/lib/gridRowStatus.ts"; +import { matchesRowStatusFilter, rowStatusFilterAfterAddingRow, type RowStatus } from "../../src/lib/gridRowStatus.ts"; const statuses: RowStatus[] = ["clean", "edited", "new", "deleted"]; diff --git a/tests/gridSelection.test.ts b/packages/app-tests/gridSelection.test.ts similarity index 97% rename from tests/gridSelection.test.ts rename to packages/app-tests/gridSelection.test.ts index 32a80ef41..7427426fe 100644 --- a/tests/gridSelection.test.ts +++ b/packages/app-tests/gridSelection.test.ts @@ -8,7 +8,7 @@ import { formatSelectionAsTsv, isCellInSelection, normalizeSelectionRange, -} from "../src/lib/gridSelection.ts"; +} from "../../src/lib/gridSelection.ts"; test("normalizes a dragged cell range in either direction", () => { const range = normalizeSelectionRange( diff --git a/tests/historyActions.test.ts b/packages/app-tests/historyActions.test.ts similarity index 94% rename from tests/historyActions.test.ts rename to packages/app-tests/historyActions.test.ts index 474a12770..04386640c 100644 --- a/tests/historyActions.test.ts +++ b/packages/app-tests/historyActions.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { shouldDeleteHistoryEntry, shouldClearHistory } from "../src/lib/historyActions.ts"; +import { shouldDeleteHistoryEntry, shouldClearHistory } from "../../src/lib/historyActions.ts"; test("requires confirmation before deleting history entries", () => { assert.equal(shouldDeleteHistoryEntry(() => false), false); diff --git a/tests/historyActivityKind.test.ts b/packages/app-tests/historyActivityKind.test.ts similarity index 91% rename from tests/historyActivityKind.test.ts rename to packages/app-tests/historyActivityKind.test.ts index c441b008f..caa8f0a69 100644 --- a/tests/historyActivityKind.test.ts +++ b/packages/app-tests/historyActivityKind.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { resolveHistoryActivityKind } from "../src/lib/historyActivityKind.ts"; +import { resolveHistoryActivityKind } from "../../src/lib/historyActivityKind.ts"; test("legacy INSERT history entries are treated as data changes", () => { assert.equal( diff --git a/tests/historyAiAnalysis.test.ts b/packages/app-tests/historyAiAnalysis.test.ts similarity index 97% rename from tests/historyAiAnalysis.test.ts rename to packages/app-tests/historyAiAnalysis.test.ts index ab9500337..33fdf5468 100644 --- a/tests/historyAiAnalysis.test.ts +++ b/packages/app-tests/historyAiAnalysis.test.ts @@ -4,7 +4,7 @@ import { buildHistoryAiAnalysisPrompt, canRollbackHistoryEntry, type HistoryAiAnalysisEntry, -} from "../src/lib/historyAiAnalysis.ts"; +} from "../../src/lib/historyAiAnalysis.ts"; const baseEntry: HistoryAiAnalysisEntry = { id: "h1", diff --git a/tests/historyVirtualList.test.ts b/packages/app-tests/historyVirtualList.test.ts similarity index 92% rename from tests/historyVirtualList.test.ts rename to packages/app-tests/historyVirtualList.test.ts index 9cb69cf22..a20c78d05 100644 --- a/tests/historyVirtualList.test.ts +++ b/packages/app-tests/historyVirtualList.test.ts @@ -4,7 +4,7 @@ import { HISTORY_ROW_HEIGHT, HISTORY_SCROLL_BUFFER, shouldVirtualizeHistory, -} from "../src/lib/historyVirtualList.ts"; +} from "../../src/lib/historyVirtualList.ts"; test("history list virtualizes every non-empty result set", () => { assert.equal(shouldVirtualizeHistory(0), false); diff --git a/tests/keyboardShortcuts.test.ts b/packages/app-tests/keyboardShortcuts.test.ts similarity index 96% rename from tests/keyboardShortcuts.test.ts rename to packages/app-tests/keyboardShortcuts.test.ts index e22b02d79..756cb6677 100644 --- a/tests/keyboardShortcuts.test.ts +++ b/packages/app-tests/keyboardShortcuts.test.ts @@ -8,8 +8,8 @@ import { isFocusSearchShortcut, isObjectSourceSaveShortcutTarget, isSaveShortcut, -} from "../src/lib/keyboardShortcuts.ts"; -import { shortcutToCodeMirrorKey } from "../src/lib/shortcutRegistry.ts"; +} from "../../src/lib/keyboardShortcuts.ts"; +import { shortcutToCodeMirrorKey } from "../../src/lib/shortcutRegistry.ts"; test("matches Cmd+Enter for SQL execution", () => { assert.equal(isExecuteSqlShortcut({ key: "Enter", metaKey: true }), true); diff --git a/tests/markdownTable.test.ts b/packages/app-tests/markdownTable.test.ts similarity index 87% rename from tests/markdownTable.test.ts rename to packages/app-tests/markdownTable.test.ts index 8421067f8..f4db75d06 100644 --- a/tests/markdownTable.test.ts +++ b/packages/app-tests/markdownTable.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { formatMarkdownTable } from "../src/lib/markdownTable.ts"; +import { formatMarkdownTable } from "../../src/lib/markdownTable.ts"; test("escapes markdown table pipes and normalizes newlines", () => { const markdown = formatMarkdownTable({ diff --git a/tests/mongoShellCommand.test.ts b/packages/app-tests/mongoShellCommand.test.ts similarity index 97% rename from tests/mongoShellCommand.test.ts rename to packages/app-tests/mongoShellCommand.test.ts index ca2d37dd0..b12eed17c 100644 --- a/tests/mongoShellCommand.test.ts +++ b/packages/app-tests/mongoShellCommand.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { mongoDocumentsToQueryResult, parseMongoFindCommand } from "../src/lib/mongoShellCommand.ts"; +import { mongoDocumentsToQueryResult, parseMongoFindCommand } from "../../src/lib/mongoShellCommand.ts"; test("parseMongoFindCommand parses db collection find with an empty JSON filter", () => { assert.deepEqual(parseMongoFindCommand("db.users.find({})"), { diff --git a/tests/objectRenameSql.test.ts b/packages/app-tests/objectRenameSql.test.ts similarity index 96% rename from tests/objectRenameSql.test.ts rename to packages/app-tests/objectRenameSql.test.ts index 5369396ef..30fdc3131 100644 --- a/tests/objectRenameSql.test.ts +++ b/packages/app-tests/objectRenameSql.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { buildRenameObjectSql, supportsObjectRename } from "../src/lib/objectRenameSql.ts"; +import { buildRenameObjectSql, supportsObjectRename } from "../../src/lib/objectRenameSql.ts"; test("builds MySQL table and view rename statements", () => { assert.equal( diff --git a/tests/objectSourceEditor.test.ts b/packages/app-tests/objectSourceEditor.test.ts similarity index 97% rename from tests/objectSourceEditor.test.ts rename to packages/app-tests/objectSourceEditor.test.ts index 6afb73265..fdf1c6f0e 100644 --- a/tests/objectSourceEditor.test.ts +++ b/packages/app-tests/objectSourceEditor.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { buildExecutableObjectSourceSql, objectSourceSaveExecutionMode } from "../src/lib/objectSourceEditor.ts"; +import { buildExecutableObjectSourceSql, objectSourceSaveExecutionMode } from "../../src/lib/objectSourceEditor.ts"; test("SQL Server edited source saves as ALTER", () => { const sql = buildExecutableObjectSourceSql({ diff --git a/tests/openTabsPersistence.test.ts b/packages/app-tests/openTabsPersistence.test.ts similarity index 95% rename from tests/openTabsPersistence.test.ts rename to packages/app-tests/openTabsPersistence.test.ts index c732bd43b..411b32695 100644 --- a/tests/openTabsPersistence.test.ts +++ b/packages/app-tests/openTabsPersistence.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { restoreOpenTabsState, serializeOpenTabs } from "../src/lib/openTabsPersistence.ts"; -import type { QueryTab } from "../src/types/database.ts"; +import { restoreOpenTabsState, serializeOpenTabs } from "../../src/lib/openTabsPersistence.ts"; +import type { QueryTab } from "../../src/types/database.ts"; function queryTab(overrides: Partial = {}): QueryTab { return { diff --git a/tests/pinnedItems.test.ts b/packages/app-tests/pinnedItems.test.ts similarity index 88% rename from tests/pinnedItems.test.ts rename to packages/app-tests/pinnedItems.test.ts index 1ab334883..3a72a2104 100644 --- a/tests/pinnedItems.test.ts +++ b/packages/app-tests/pinnedItems.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { applyPinnedTreeNodeState, orderPinnedFirst } from "../src/lib/pinnedItems.ts"; -import type { TreeNode } from "../src/types/database.ts"; +import { applyPinnedTreeNodeState, orderPinnedFirst } from "../../src/lib/pinnedItems.ts"; +import type { TreeNode } from "../../src/types/database.ts"; test("orders pinned items before unpinned items without changing relative order", () => { const items = [ diff --git a/tests/queryExecutionState.test.ts b/packages/app-tests/queryExecutionState.test.ts similarity index 95% rename from tests/queryExecutionState.test.ts rename to packages/app-tests/queryExecutionState.test.ts index 269c8276d..77fd55968 100644 --- a/tests/queryExecutionState.test.ts +++ b/packages/app-tests/queryExecutionState.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { canCancelQueryExecution, queryExecutionLabelKey } from "../src/lib/queryExecutionState.ts"; +import { canCancelQueryExecution, queryExecutionLabelKey } from "../../src/lib/queryExecutionState.ts"; test("only allows cancelling an active execution with an execution id", () => { assert.equal(canCancelQueryExecution({ isExecuting: true, executionId: "exec-1" }), true); diff --git a/tests/queryResultPagination.test.ts b/packages/app-tests/queryResultPagination.test.ts similarity index 98% rename from tests/queryResultPagination.test.ts rename to packages/app-tests/queryResultPagination.test.ts index c7cbe809b..7210ce49d 100644 --- a/tests/queryResultPagination.test.ts +++ b/packages/app-tests/queryResultPagination.test.ts @@ -4,7 +4,7 @@ import { buildCountQuerySql, buildPaginatedQuerySql, buildQueryPaginationExecutionPlan, -} from "../src/lib/queryResultPagination.ts"; +} from "../../src/lib/queryResultPagination.ts"; test("wraps a single select query with limit and offset", () => { const result = buildPaginatedQuerySql("SELECT id, name FROM users;", "postgres", 100, 200); diff --git a/tests/queryResultSort.test.ts b/packages/app-tests/queryResultSort.test.ts similarity index 96% rename from tests/queryResultSort.test.ts rename to packages/app-tests/queryResultSort.test.ts index 7ed9f629d..9d0b26333 100644 --- a/tests/queryResultSort.test.ts +++ b/packages/app-tests/queryResultSort.test.ts @@ -1,6 +1,6 @@ import assert from "node:assert/strict"; import test from "node:test"; -import { buildSortedQuerySql } from "../src/lib/queryResultSort.ts"; +import { buildSortedQuerySql } from "../../src/lib/queryResultSort.ts"; test("wraps a single select query with outer order by", () => { const result = buildSortedQuerySql("SELECT id, name FROM users;", "postgres", ["id", "name"], 1, "name", "asc"); diff --git a/tests/queryStore.test.ts b/packages/app-tests/queryStore.test.ts similarity index 92% rename from tests/queryStore.test.ts rename to packages/app-tests/queryStore.test.ts index a4d0ca21d..19b67ee9c 100644 --- a/tests/queryStore.test.ts +++ b/packages/app-tests/queryStore.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from "node:assert"; import test from "node:test"; import { createPinia, setActivePinia } from "pinia"; -import { useQueryStore } from "../src/stores/queryStore.ts"; +import { useQueryStore } from "../../src/stores/queryStore.ts"; test("setErrorResult stops loading and shows the error result", () => { setActivePinia(createPinia()); diff --git a/tests/redisCommandSafety.test.ts b/packages/app-tests/redisCommandSafety.test.ts similarity index 95% rename from tests/redisCommandSafety.test.ts rename to packages/app-tests/redisCommandSafety.test.ts index 8f0822741..1957f909b 100644 --- a/tests/redisCommandSafety.test.ts +++ b/packages/app-tests/redisCommandSafety.test.ts @@ -1,6 +1,6 @@ import test from "node:test"; import assert from "node:assert/strict"; -import { classifyRedisCommandSafety, firstRedisCommandToken } from "../src/lib/redisCommandSafety.ts"; +import { classifyRedisCommandSafety, firstRedisCommandToken } from "../../src/lib/redisCommandSafety.ts"; test("firstRedisCommandToken reads the first command token case-insensitively", () => { assert.equal(firstRedisCommandToken(" get user:1"), "GET"); diff --git a/tests/redisKeyTree.test.ts b/packages/app-tests/redisKeyTree.test.ts similarity index 97% rename from tests/redisKeyTree.test.ts rename to packages/app-tests/redisKeyTree.test.ts index f25abc542..5f4834f9d 100644 --- a/tests/redisKeyTree.test.ts +++ b/packages/app-tests/redisKeyTree.test.ts @@ -6,8 +6,8 @@ import { collectExpandedGroupIds, flattenVisibleRedisKeyTree, type RedisKeyTreeNode, -} from "../src/lib/redisKeyTree.ts"; -import type { RedisKeyInfo } from "../src/lib/api.ts"; +} from "../../src/lib/redisKeyTree.ts"; +import type { RedisKeyInfo } from "../../src/lib/api.ts"; function makeKey(key_display: string, key_raw: string, key_type = "string", ttl = -1): RedisKeyInfo { return { key_display, key_raw, key_type, ttl }; diff --git a/tests/redisValuePresentation.test.ts b/packages/app-tests/redisValuePresentation.test.ts similarity index 98% rename from tests/redisValuePresentation.test.ts rename to packages/app-tests/redisValuePresentation.test.ts index 92fbadb81..79f792d78 100644 --- a/tests/redisValuePresentation.test.ts +++ b/packages/app-tests/redisValuePresentation.test.ts @@ -6,7 +6,7 @@ import { formatRedisMemberDetail, getRedisMemberSelectionKey, highlightRedisJsonDetail, -} from "../src/lib/redisValuePresentation.ts"; +} from "../../src/lib/redisValuePresentation.ts"; test("formats JSON object strings for Redis member details", () => { const detail = formatRedisMemberDetail('{"id":1,"name":"Ada","tags":["dbx","redis"]}'); diff --git a/tests/releasePresentation.test.ts b/packages/app-tests/releasePresentation.test.ts similarity index 100% rename from tests/releasePresentation.test.ts rename to packages/app-tests/releasePresentation.test.ts diff --git a/tests/schemaDiff.test.ts b/packages/app-tests/schemaDiff.test.ts similarity index 96% rename from tests/schemaDiff.test.ts rename to packages/app-tests/schemaDiff.test.ts index 889ccfc7d..dd281760a 100644 --- a/tests/schemaDiff.test.ts +++ b/packages/app-tests/schemaDiff.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { diffForeignKeys, diffIndexes, generateSyncSql, type TableDiff } from "../src/lib/schemaDiff.ts"; -import type { ForeignKeyInfo, IndexInfo } from "../src/types/database.ts"; +import { diffForeignKeys, diffIndexes, generateSyncSql, type TableDiff } from "../../src/lib/schemaDiff.ts"; +import type { ForeignKeyInfo, IndexInfo } from "../../src/types/database.ts"; function index(overrides: Partial): IndexInfo { return { diff --git a/tests/schemaOptions.test.ts b/packages/app-tests/schemaOptions.test.ts similarity index 79% rename from tests/schemaOptions.test.ts rename to packages/app-tests/schemaOptions.test.ts index 2fa068508..b1c1dd0a5 100644 --- a/tests/schemaOptions.test.ts +++ b/packages/app-tests/schemaOptions.test.ts @@ -1,6 +1,6 @@ import test from "node:test"; import assert from "node:assert/strict"; -import { hasSchemaOptionsCacheEntry } from "../src/composables/useSchemaOptions.ts"; +import { hasSchemaOptionsCacheEntry } from "../../src/composables/useSchemaOptions.ts"; test("treats an empty schema option list as a loaded cache entry", () => { const options = { diff --git a/tests/schemaTreeCache.test.ts b/packages/app-tests/schemaTreeCache.test.ts similarity index 96% rename from tests/schemaTreeCache.test.ts rename to packages/app-tests/schemaTreeCache.test.ts index f074f38d1..3a84d4024 100644 --- a/tests/schemaTreeCache.test.ts +++ b/packages/app-tests/schemaTreeCache.test.ts @@ -4,7 +4,7 @@ import { SCHEMA_TREE_CACHE_TTL_MS, decodeSchemaTreeCache, encodeSchemaTreeCache, -} from "../src/lib/schemaTreeCache.ts"; +} from "../../src/lib/schemaTreeCache.ts"; const children = [{ id: "conn:db", label: "db", type: "database" }]; const now = Date.parse("2026-05-17T10:00:00.000Z"); diff --git a/tests/settingsDialogLayout.test.ts b/packages/app-tests/settingsDialogLayout.test.ts similarity index 100% rename from tests/settingsDialogLayout.test.ts rename to packages/app-tests/settingsDialogLayout.test.ts diff --git a/tests/settingsStore.test.ts b/packages/app-tests/settingsStore.test.ts similarity index 99% rename from tests/settingsStore.test.ts rename to packages/app-tests/settingsStore.test.ts index ebe3b5b03..1bcb23b1d 100644 --- a/tests/settingsStore.test.ts +++ b/packages/app-tests/settingsStore.test.ts @@ -5,7 +5,7 @@ import { DEFAULT_EDITOR_SETTINGS, normalizeAiConfig, normalizeEditorSettings, -} from "../src/stores/settingsStore.ts"; +} from "../../src/stores/settingsStore.ts"; test("defaults Redis scan page size to 1000 keys", () => { assert.equal(DEFAULT_EDITOR_SETTINGS.redisScanPageSize, 1000); diff --git a/tests/sidebarLayout.test.ts b/packages/app-tests/sidebarLayout.test.ts similarity index 98% rename from tests/sidebarLayout.test.ts rename to packages/app-tests/sidebarLayout.test.ts index b4e052b3b..283a89142 100644 --- a/tests/sidebarLayout.test.ts +++ b/packages/app-tests/sidebarLayout.test.ts @@ -12,8 +12,8 @@ import { appendConnectionToLayout, removeConnectionFromSidebarLayout, emptyLayout, -} from "../src/lib/sidebarLayout.ts"; -import type { ConnectionConfig, SidebarLayout } from "../src/types/database.ts"; +} from "../../src/lib/sidebarLayout.ts"; +import type { ConnectionConfig, SidebarLayout } from "../../src/types/database.ts"; function conn(id: string, name?: string): ConnectionConfig { return { diff --git a/tests/sidebarSearch.test.ts b/packages/app-tests/sidebarSearch.test.ts similarity index 93% rename from tests/sidebarSearch.test.ts rename to packages/app-tests/sidebarSearch.test.ts index 7176967ab..871bdd1f1 100644 --- a/tests/sidebarSearch.test.ts +++ b/packages/app-tests/sidebarSearch.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import { test } from "node:test"; -import { matchSidebarLabel } from "../src/lib/sidebarSearch.ts"; +import { matchSidebarLabel } from "../../src/lib/sidebarSearch.ts"; test("matches exact and prefix labels first", () => { assert.equal(matchSidebarLabel("orders", "orders")?.kind, "exact"); diff --git a/tests/sidebarSearchTree.test.ts b/packages/app-tests/sidebarSearchTree.test.ts similarity index 91% rename from tests/sidebarSearchTree.test.ts rename to packages/app-tests/sidebarSearchTree.test.ts index 6202b6a4a..ebd9be975 100644 --- a/tests/sidebarSearchTree.test.ts +++ b/packages/app-tests/sidebarSearchTree.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { filterSidebarTree } from "../src/lib/sidebarSearchTree.ts"; -import type { TreeNode } from "../src/types/database.ts"; +import { filterSidebarTree } from "../../src/lib/sidebarSearchTree.ts"; +import type { TreeNode } from "../../src/types/database.ts"; test("preserves loaded table children when the table itself matches search", () => { const nodes: TreeNode[] = [ diff --git a/tests/sidebarTreeItemLayout.test.ts b/packages/app-tests/sidebarTreeItemLayout.test.ts similarity index 96% rename from tests/sidebarTreeItemLayout.test.ts rename to packages/app-tests/sidebarTreeItemLayout.test.ts index 17fad700a..b22b043cd 100644 --- a/tests/sidebarTreeItemLayout.test.ts +++ b/packages/app-tests/sidebarTreeItemLayout.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { canTreeNodeExpand, canTreeNodeShowExpander, treeItemPaddingLeft } from "../src/lib/sidebarTreeItemLayout.ts"; +import { canTreeNodeExpand, canTreeNodeShowExpander, treeItemPaddingLeft } from "../../src/lib/sidebarTreeItemLayout.ts"; test("treeItemPaddingLeft converts tree depth to sidebar indentation", () => { assert.equal(treeItemPaddingLeft(0), "8px"); diff --git a/tests/sqlAnalysis.test.ts b/packages/app-tests/sqlAnalysis.test.ts similarity index 98% rename from tests/sqlAnalysis.test.ts rename to packages/app-tests/sqlAnalysis.test.ts index 4774caad1..9b295be8d 100644 --- a/tests/sqlAnalysis.test.ts +++ b/packages/app-tests/sqlAnalysis.test.ts @@ -6,7 +6,7 @@ import { analyzeEditableQuery, analyzeEditableQueryEditability, queryEditabilityMessageKey, -} from "../src/lib/sqlAnalysis.ts"; +} from "../../src/lib/sqlAnalysis.ts"; test("recognizes a simple single-table SELECT as editable", () => { const result = analyzeEditableQueryEditability("select id, name from public.users where active = true order by id"); diff --git a/tests/sqlCompletion.test.ts b/packages/app-tests/sqlCompletion.test.ts similarity index 99% rename from tests/sqlCompletion.test.ts rename to packages/app-tests/sqlCompletion.test.ts index 35423b095..ebe3b3307 100644 --- a/tests/sqlCompletion.test.ts +++ b/packages/app-tests/sqlCompletion.test.ts @@ -6,7 +6,7 @@ import { shouldAutoOpenSqlCompletion, type SqlCompletionColumn, type SqlCompletionTable, -} from "../src/lib/sqlCompletion.ts"; +} from "../../src/lib/sqlCompletion.ts"; const tables: SqlCompletionTable[] = [ { name: "users", schema: "public", type: "table" }, diff --git a/tests/sqlDiagnostics.test.ts b/packages/app-tests/sqlDiagnostics.test.ts similarity index 91% rename from tests/sqlDiagnostics.test.ts rename to packages/app-tests/sqlDiagnostics.test.ts index 7712ee82d..1ef0f0cb4 100644 --- a/tests/sqlDiagnostics.test.ts +++ b/packages/app-tests/sqlDiagnostics.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { parseSqlErrorLocation } from "../src/lib/sqlDiagnostics.ts"; +import { parseSqlErrorLocation } from "../../src/lib/sqlDiagnostics.ts"; test("parses generic line and column error positions", () => { assert.deepEqual(parseSqlErrorLocation("syntax error at line 3 column 12"), { diff --git a/tests/sqlExecutionTarget.test.ts b/packages/app-tests/sqlExecutionTarget.test.ts similarity index 87% rename from tests/sqlExecutionTarget.test.ts rename to packages/app-tests/sqlExecutionTarget.test.ts index ce9e8491f..65eb23edd 100644 --- a/tests/sqlExecutionTarget.test.ts +++ b/packages/app-tests/sqlExecutionTarget.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { resolveExecutableSql } from "../src/lib/sqlExecutionTarget.ts"; +import { resolveExecutableSql } from "../../src/lib/sqlExecutionTarget.ts"; test("uses selected SQL when the editor has a non-empty selection", () => { const sql = "SELECT * FROM users;\nSELECT * FROM orders;"; diff --git a/tests/sqlFileOpen.test.ts b/packages/app-tests/sqlFileOpen.test.ts similarity index 94% rename from tests/sqlFileOpen.test.ts rename to packages/app-tests/sqlFileOpen.test.ts index 747302144..31c23fa72 100644 --- a/tests/sqlFileOpen.test.ts +++ b/packages/app-tests/sqlFileOpen.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { externalSqlFilePaths, isSqlFilePath, sqlFileTitleFromPath } from "../src/lib/sqlFileOpen.ts"; +import { externalSqlFilePaths, isSqlFilePath, sqlFileTitleFromPath } from "../../src/lib/sqlFileOpen.ts"; test("detects SQL file paths case-insensitively", () => { assert.equal(isSqlFilePath("/tmp/report.sql"), true); diff --git a/tests/sqlFormatter.test.ts b/packages/app-tests/sqlFormatter.test.ts similarity index 89% rename from tests/sqlFormatter.test.ts rename to packages/app-tests/sqlFormatter.test.ts index 6f28e4a29..f64648e89 100644 --- a/tests/sqlFormatter.test.ts +++ b/packages/app-tests/sqlFormatter.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { formatSqlText } from "../src/lib/sqlFormatter.ts"; +import { formatSqlText } from "../../src/lib/sqlFormatter.ts"; test("formats SQL with uppercase keywords and readable line breaks", async () => { const formatted = await formatSqlText("select id, name from users where active = 1 order by name", "postgres"); diff --git a/tests/sqlMetadataRefresh.test.ts b/packages/app-tests/sqlMetadataRefresh.test.ts similarity index 98% rename from tests/sqlMetadataRefresh.test.ts rename to packages/app-tests/sqlMetadataRefresh.test.ts index be72f9bed..3662a3cbc 100644 --- a/tests/sqlMetadataRefresh.test.ts +++ b/packages/app-tests/sqlMetadataRefresh.test.ts @@ -1,6 +1,6 @@ import assert from "node:assert/strict"; import test from "node:test"; -import { sqlMetadataRefreshScope, sqlMetadataRefreshTarget } from "../src/lib/sqlMetadataRefresh.ts"; +import { sqlMetadataRefreshScope, sqlMetadataRefreshTarget } from "../../src/lib/sqlMetadataRefresh.ts"; test("database DDL refreshes the connection database list", () => { assert.equal(sqlMetadataRefreshScope("CREATE DATABASE app;"), "connection"); diff --git a/tests/sqlServerTree.test.ts b/packages/app-tests/sqlServerTree.test.ts similarity index 93% rename from tests/sqlServerTree.test.ts rename to packages/app-tests/sqlServerTree.test.ts index cab2d3715..eb132055c 100644 --- a/tests/sqlServerTree.test.ts +++ b/packages/app-tests/sqlServerTree.test.ts @@ -1,7 +1,7 @@ import test from "node:test"; import assert from "node:assert/strict"; -import { buildSqlServerDatabaseTreeNodes } from "../src/lib/sqlServerTree.ts"; -import type { ObjectInfo } from "../src/types/database.ts"; +import { buildSqlServerDatabaseTreeNodes } from "../../src/lib/sqlServerTree.ts"; +import type { ObjectInfo } from "../../src/types/database.ts"; function obj(name: string, objectType = "TABLE"): ObjectInfo { return { diff --git a/tests/sqlStatementSplit.test.ts b/packages/app-tests/sqlStatementSplit.test.ts similarity index 96% rename from tests/sqlStatementSplit.test.ts rename to packages/app-tests/sqlStatementSplit.test.ts index 1976cdc00..298ef46e6 100644 --- a/tests/sqlStatementSplit.test.ts +++ b/packages/app-tests/sqlStatementSplit.test.ts @@ -1,6 +1,6 @@ import test from "node:test"; import assert from "node:assert/strict"; -import { findStatementAtCursor } from "../src/lib/sqlStatementSplit.ts"; +import { findStatementAtCursor } from "../../src/lib/sqlStatementSplit.ts"; test("finds single statement", () => { assert.equal(findStatementAtCursor("SELECT 1", 3), "SELECT 1"); diff --git a/tests/tabCloseActions.test.ts b/packages/app-tests/tabCloseActions.test.ts similarity index 91% rename from tests/tabCloseActions.test.ts rename to packages/app-tests/tabCloseActions.test.ts index ca68c65f5..4f550dc24 100644 --- a/tests/tabCloseActions.test.ts +++ b/packages/app-tests/tabCloseActions.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { closeAllTabsState, closeOtherTabsState } from "../src/lib/tabCloseActions.ts"; +import { closeAllTabsState, closeOtherTabsState } from "../../src/lib/tabCloseActions.ts"; test("close other tabs keeps the target tab and makes it active", () => { const tabs = [{ id: "a" }, { id: "b" }, { id: "c" }]; diff --git a/tests/tableDataExport.test.ts b/packages/app-tests/tableDataExport.test.ts similarity index 91% rename from tests/tableDataExport.test.ts rename to packages/app-tests/tableDataExport.test.ts index 6608057ae..8ee7d9c52 100644 --- a/tests/tableDataExport.test.ts +++ b/packages/app-tests/tableDataExport.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { fetchTableDataForExport, TABLE_DATA_EXPORT_PAGE_SIZE } from "../src/lib/tableDataExport.ts"; -import type { QueryResult } from "../src/types/database.ts"; +import { fetchTableDataForExport, TABLE_DATA_EXPORT_PAGE_SIZE } from "../../src/lib/tableDataExport.ts"; +import type { QueryResult } from "../../src/types/database.ts"; function result(rows: QueryResult["rows"]): QueryResult { return { diff --git a/tests/tableEditing.test.ts b/packages/app-tests/tableEditing.test.ts similarity index 98% rename from tests/tableEditing.test.ts rename to packages/app-tests/tableEditing.test.ts index 91e031e09..4da78b054 100644 --- a/tests/tableEditing.test.ts +++ b/packages/app-tests/tableEditing.test.ts @@ -12,8 +12,8 @@ import { isTableDataEditable, supportsDataGridTransaction, usesSyntheticRowIdKey, -} from "../src/lib/tableEditing.ts"; -import type { ColumnInfo } from "../src/types/database.ts"; +} from "../../src/lib/tableEditing.ts"; +import type { ColumnInfo } from "../../src/types/database.ts"; function column(name: string, isPrimaryKey = false): ColumnInfo { return { diff --git a/tests/tableImport.test.ts b/packages/app-tests/tableImport.test.ts similarity index 95% rename from tests/tableImport.test.ts rename to packages/app-tests/tableImport.test.ts index b3f4b1c89..ef8d3dc56 100644 --- a/tests/tableImport.test.ts +++ b/packages/app-tests/tableImport.test.ts @@ -3,7 +3,7 @@ import test from "node:test"; import { autoMapImportColumns, normalizeImportColumnName, -} from "../src/lib/tableImport.ts"; +} from "../../src/lib/tableImport.ts"; test("normalizes import column names for matching", () => { assert.equal(normalizeImportColumnName(" User ID "), "user id"); diff --git a/tests/tableSelectSql.test.ts b/packages/app-tests/tableSelectSql.test.ts similarity index 97% rename from tests/tableSelectSql.test.ts rename to packages/app-tests/tableSelectSql.test.ts index c7b3a811d..7a3908164 100644 --- a/tests/tableSelectSql.test.ts +++ b/packages/app-tests/tableSelectSql.test.ts @@ -1,7 +1,7 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { DBX_ROWID_COLUMN } from "../src/lib/tableEditing.ts"; -import { buildTableSelectSql } from "../src/lib/tableSelectSql.ts"; +import { DBX_ROWID_COLUMN } from "../../src/lib/tableEditing.ts"; +import { buildTableSelectSql } from "../../src/lib/tableSelectSql.ts"; test("builds a MySQL table WHERE query from search input", () => { const sql = buildTableSelectSql({ diff --git a/tests/tableStructureEditorPresentation.test.ts b/packages/app-tests/tableStructureEditorPresentation.test.ts similarity index 100% rename from tests/tableStructureEditorPresentation.test.ts rename to packages/app-tests/tableStructureEditorPresentation.test.ts diff --git a/tests/tableStructureEditorSql.test.ts b/packages/app-tests/tableStructureEditorSql.test.ts similarity index 99% rename from tests/tableStructureEditorSql.test.ts rename to packages/app-tests/tableStructureEditorSql.test.ts index 7788e6f5f..618b1746e 100644 --- a/tests/tableStructureEditorSql.test.ts +++ b/packages/app-tests/tableStructureEditorSql.test.ts @@ -4,7 +4,7 @@ import { buildTableStructureChangeSql, type EditableStructureColumn, type EditableStructureIndex, -} from "../src/lib/tableStructureEditorSql.ts"; +} from "../../src/lib/tableStructureEditorSql.ts"; function column(overrides: Partial): EditableStructureColumn { return { diff --git a/tests/tableStructureEditorState.test.ts b/packages/app-tests/tableStructureEditorState.test.ts similarity index 95% rename from tests/tableStructureEditorState.test.ts rename to packages/app-tests/tableStructureEditorState.test.ts index e5f740895..09229705e 100644 --- a/tests/tableStructureEditorState.test.ts +++ b/packages/app-tests/tableStructureEditorState.test.ts @@ -4,8 +4,8 @@ import { createColumnDrafts, createIndexDrafts, toColumnNames, -} from "../src/lib/tableStructureEditorState.ts"; -import type { ColumnInfo, IndexInfo } from "../src/types/database.ts"; +} from "../../src/lib/tableStructureEditorState.ts"; +import type { ColumnInfo, IndexInfo } from "../../src/types/database.ts"; const columns: ColumnInfo[] = [ { diff --git a/tests/tableTree.test.ts b/packages/app-tests/tableTree.test.ts similarity index 95% rename from tests/tableTree.test.ts rename to packages/app-tests/tableTree.test.ts index f256d9b08..726019f95 100644 --- a/tests/tableTree.test.ts +++ b/packages/app-tests/tableTree.test.ts @@ -1,7 +1,7 @@ import assert from "node:assert/strict"; import test from "node:test"; -import { buildTableTreeNodes, expandCachedObjectBrowserNodes, objectGroupRefreshParentId } from "../src/lib/tableTree.ts"; -import type { TableInfo } from "../src/types/database.ts"; +import { buildTableTreeNodes, expandCachedObjectBrowserNodes, objectGroupRefreshParentId } from "../../src/lib/tableTree.ts"; +import type { TableInfo } from "../../src/types/database.ts"; function table(name: string, tableType: "TABLE" | "VIEW" = "TABLE"): TableInfo { return { name, table_type: tableType }; diff --git a/tests/tauriRuntime.test.ts b/packages/app-tests/tauriRuntime.test.ts similarity index 85% rename from tests/tauriRuntime.test.ts rename to packages/app-tests/tauriRuntime.test.ts index f9acd1b94..01ecd3c57 100644 --- a/tests/tauriRuntime.test.ts +++ b/packages/app-tests/tauriRuntime.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { isTauriRuntime } from "../src/lib/tauriRuntime.ts"; +import { isTauriRuntime } from "../../src/lib/tauriRuntime.ts"; test("detects plain browser-like globals as non-Tauri runtime", () => { assert.equal(isTauriRuntime({}), false); diff --git a/tests/transferProgressState.test.ts b/packages/app-tests/transferProgressState.test.ts similarity index 90% rename from tests/transferProgressState.test.ts rename to packages/app-tests/transferProgressState.test.ts index ba68f3ea5..5e2fd2755 100644 --- a/tests/transferProgressState.test.ts +++ b/packages/app-tests/transferProgressState.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { nextTransferTerminalState } from "../src/lib/transferProgressState.ts"; +import { nextTransferTerminalState } from "../../src/lib/transferProgressState.ts"; test("marks transfer as failed when a table progress event reports error", () => { const state = nextTransferTerminalState( diff --git a/tests/treeNodeClick.test.ts b/packages/app-tests/treeNodeClick.test.ts similarity index 98% rename from tests/treeNodeClick.test.ts rename to packages/app-tests/treeNodeClick.test.ts index 3b933f606..d1ba3f6da 100644 --- a/tests/treeNodeClick.test.ts +++ b/packages/app-tests/treeNodeClick.test.ts @@ -1,6 +1,6 @@ import test from "node:test"; import assert from "node:assert/strict"; -import { sidebarSelectionCopyAction, treeNodeRowAction, treeNodeRowDoubleClickAction } from "../src/lib/treeNodeClick.ts"; +import { sidebarSelectionCopyAction, treeNodeRowAction, treeNodeRowDoubleClickAction } from "../../src/lib/treeNodeClick.ts"; test("table and view rows open data without toggling structure groups", () => { assert.equal(treeNodeRowAction("table", true), "open-data"); diff --git a/tests/treeRefreshTarget.test.ts b/packages/app-tests/treeRefreshTarget.test.ts similarity index 85% rename from tests/treeRefreshTarget.test.ts rename to packages/app-tests/treeRefreshTarget.test.ts index 7bae71588..7185d1ea1 100644 --- a/tests/treeRefreshTarget.test.ts +++ b/packages/app-tests/treeRefreshTarget.test.ts @@ -1,7 +1,7 @@ import assert from "node:assert/strict"; import test from "node:test"; -import { findDatabaseTreeNode } from "../src/lib/treeRefreshTarget.ts"; -import type { TreeNode } from "../src/types/database.ts"; +import { findDatabaseTreeNode } from "../../src/lib/treeRefreshTarget.ts"; +import type { TreeNode } from "../../src/types/database.ts"; test("finds database refresh targets inside grouped sidebar trees", () => { const target: TreeNode = { diff --git a/tests/useFlatTree.test.ts b/packages/app-tests/useFlatTree.test.ts similarity index 94% rename from tests/useFlatTree.test.ts rename to packages/app-tests/useFlatTree.test.ts index 5744f37a9..b929ff981 100644 --- a/tests/useFlatTree.test.ts +++ b/packages/app-tests/useFlatTree.test.ts @@ -6,8 +6,8 @@ import { SIDEBAR_TREE_SCROLL_BUFFER, flattenTree, shouldVirtualizeFlatTree, -} from "../src/composables/useFlatTree.ts"; -import type { TreeNode } from "../src/types/database.ts"; +} from "../../src/composables/useFlatTree.ts"; +import type { TreeNode } from "../../src/types/database.ts"; test("flattenTree preserves depth and node type for virtualized sidebar rows", () => { const nodes: TreeNode[] = [ diff --git a/tests/useSqlExecution.test.ts b/packages/app-tests/useSqlExecution.test.ts similarity index 96% rename from tests/useSqlExecution.test.ts rename to packages/app-tests/useSqlExecution.test.ts index 602c4d5f6..26b4a31f9 100644 --- a/tests/useSqlExecution.test.ts +++ b/packages/app-tests/useSqlExecution.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { isDangerousSql, stripSqlComments } from "../src/composables/useSqlExecution.ts"; +import { isDangerousSql, stripSqlComments } from "../../src/composables/useSqlExecution.ts"; test("stripSqlComments removes block comments", () => { assert.equal(stripSqlComments("SELECT /* drop */ 1").includes("drop"), false); diff --git a/tests/visibleDatabases.test.ts b/packages/app-tests/visibleDatabases.test.ts similarity index 96% rename from tests/visibleDatabases.test.ts rename to packages/app-tests/visibleDatabases.test.ts index 65852a13d..e0216c33d 100644 --- a/tests/visibleDatabases.test.ts +++ b/packages/app-tests/visibleDatabases.test.ts @@ -4,7 +4,7 @@ import { filterVisibleDatabaseNames, normalizeVisibleDatabaseSelection, visibleDatabaseFilterIsEnabled, -} from "../src/lib/visibleDatabases.ts"; +} from "../../src/lib/visibleDatabases.ts"; test("undefined visible database filter keeps every database", () => { assert.deepEqual(filterVisibleDatabaseNames(["app", "analytics"], undefined), ["app", "analytics"]); diff --git a/tests/xlsxExport.test.ts b/packages/app-tests/xlsxExport.test.ts similarity index 94% rename from tests/xlsxExport.test.ts rename to packages/app-tests/xlsxExport.test.ts index 261263fe8..26b33ff23 100644 --- a/tests/xlsxExport.test.ts +++ b/packages/app-tests/xlsxExport.test.ts @@ -1,6 +1,6 @@ import { strict as assert } from "node:assert"; import test from "node:test"; -import { buildXlsxWorkbook } from "../src/lib/xlsxExport.ts"; +import { buildXlsxWorkbook } from "../../src/lib/xlsxExport.ts"; test("builds an xlsx workbook zip with worksheet data", () => { const workbook = buildXlsxWorkbook({