25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。
TypeScript aicliclickhousedatabasedatabase-clientdatabase-managementdockerguimcpmongodbmysqlpostgresqlredisrustsql-serversqlitetaurivue
chore(repo): move app tests under packages
t8y25dabdb3985da
diff --git a/scripts/sync-changelog.mjs b/.github/scripts/sync-changelog.mjssimilarity index 100%rename from scripts/sync-changelog.mjsrename to .github/scripts/sync-changelog.mjsdiff --git a/.github/workflows/sync-changelog.yml b/.github/workflows/sync-changelog.ymlindex dcc00c0b3c..88ac8a6c53 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.mjsenv:GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}diff --git a/package.json b/package.jsonindex 20f57e914e..978efd8221 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.tssimilarity index 95%rename from tests/actionActivation.test.tsrename to packages/app-tests/actionActivation.test.tsindex 9cddba39a7..2c20606f46 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.tssimilarity index 92%rename from tests/agentDriverInstallHint.test.tsrename to packages/app-tests/agentDriverInstallHint.test.tsindex 2ab7fdb729..39168557c1 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.tssimilarity index 85%rename from tests/agentDriverUpdateBadge.test.tsrename to packages/app-tests/agentDriverUpdateBadge.test.tsindex 0afce9e91a..0a4ae2f34f 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.tssimilarity index 96%rename from tests/aiAgentPlan.test.tsrename to packages/app-tests/aiAgentPlan.test.tsindex 874b47b583..810b764642 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> = {}): ConnectionConfig {return {diff --git a/tests/aiAgentStepPresentation.test.ts b/packages/app-tests/aiAgentStepPresentation.test.tssimilarity index 96%rename from tests/aiAgentStepPresentation.test.tsrename to packages/app-tests/aiAgentStepPresentation.test.tsindex 1cadbeaa40..74541ffed3 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.tssimilarity index 95%rename from tests/aiPrompt.test.tsrename to packages/app-tests/aiPrompt.test.tsindex e2c3fb8195..5e4691fca5 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<string, string>();@@ -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> = {}): AiContext {return {diff --git a/tests/aiPromptEval.test.ts b/packages/app-tests/aiPromptEval.test.tssimilarity index 97%rename from tests/aiPromptEval.test.tsrename to packages/app-tests/aiPromptEval.test.tsindex 9f4f8ef01b..eba358179f 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<string, string>();@@ -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> = {}): AiContext {return {diff --git a/tests/aiSkills.test.ts b/packages/app-tests/aiSkills.test.tssimilarity index 92%rename from tests/aiSkills.test.tsrename to packages/app-tests/aiSkills.test.tsindex e14fae0425..8fd47942e9 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.tssimilarity index 97%rename from tests/aiSqlExecutionPolicy.test.tsrename to packages/app-tests/aiSqlExecutionPolicy.test.tsindex 3f67836936..bc540a57d6 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> = {}): ConnectionConfig {return {diff --git a/tests/aiTableMentions.test.ts b/packages/app-tests/aiTableMentions.test.tssimilarity index 92%rename from tests/aiTableMentions.test.tsrename to packages/app-tests/aiTableMentions.test.tsindex f7985615d6..4b3aefa515 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.tssimilarity index 100%rename from tests/apiBackendContract.test.tsrename to packages/app-tests/apiBackendContract.test.tsdiff --git a/tests/appTheme.test.ts b/packages/app-tests/appTheme.test.tssimilarity index 96%rename from tests/appTheme.test.tsrename to packages/app-tests/appTheme.test.tsindex 8195bca999..c1bf9ebf9b 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.tssimilarity index 100%rename from tests/appUpdateBadge.test.tsrename to packages/app-tests/appUpdateBadge.test.tsdiff --git a/tests/cellValue.test.ts b/packages/app-tests/cellValue.test.tssimilarity index 96%rename from tests/cellValue.test.tsrename to packages/app-tests/cellValue.test.tsindex c35fc063c1..9f7dd14728 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.tssimilarity index 98%rename from tests/columnFormatter.test.tsrename to packages/app-tests/columnFormatter.test.tsindex 02f0ed4165..55a20ea858 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.tssimilarity index 97%rename from tests/configCrypto.test.tsrename to packages/app-tests/configCrypto.test.tsindex 98fac1cc17..77d67922f4 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.tssimilarity index 96%rename from tests/connectionHealth.test.tsrename to packages/app-tests/connectionHealth.test.tsindex 46948f4e96..d344a45235 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.tssimilarity index 90%rename from tests/connectionPresentation.test.tsrename to packages/app-tests/connectionPresentation.test.tsindex 27e49576c9..6962a2b784 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.tssimilarity index 98%rename from tests/connectionUrl.test.tsrename to packages/app-tests/connectionUrl.test.tsindex 355dcf4165..cbc36dd076 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:[email protected]:5433/app?sslmode=require"), {diff --git a/tests/connectionUrlPlaceholder.test.ts b/packages/app-tests/connectionUrlPlaceholder.test.tssimilarity index 96%rename from tests/connectionUrlPlaceholder.test.tsrename to packages/app-tests/connectionUrlPlaceholder.test.tsindex f322b6fc7b..2397d41b61 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<string, string> = {mysql: "mysql://user:password@host:port/database",diff --git a/tests/createDatabaseSql.test.ts b/packages/app-tests/createDatabaseSql.test.tssimilarity index 96%rename from tests/createDatabaseSql.test.tsrename to packages/app-tests/createDatabaseSql.test.tsindex 7cfcc2d91d..1bfd3647b7 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.tssimilarity index 96%rename from tests/dataCompare.test.tsrename to packages/app-tests/dataCompare.test.tsindex 70fcfab747..0f9cf77576 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.tssimilarity index 93%rename from tests/dataGridColumnWidth.test.tsrename to packages/app-tests/dataGridColumnWidth.test.tsindex a500bf5315..e7ee872093 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.tssimilarity index 98%rename from tests/dataGridEditor.test.tsrename to packages/app-tests/dataGridEditor.test.tsindex 1d5d3b765b..8cbac2344e 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.tssimilarity index 93%rename from tests/dataGridScrollGutter.test.tsrename to packages/app-tests/dataGridScrollGutter.test.tsindex 3564f3a28f..b04150dcd0 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.tssimilarity index 99%rename from tests/dataGridSql.test.tsrename to packages/app-tests/dataGridSql.test.tsindex c888ae5383..09c3b35d7e 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.tssimilarity index 98%rename from tests/dataGridTranspose.test.tsrename to packages/app-tests/dataGridTranspose.test.tsindex b517a8723c..cc9b9da167 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.tssimilarity index 98%rename from tests/databaseCapabilities.test.tsrename to packages/app-tests/databaseCapabilities.test.tsindex 34c2cad744..0a05651fe2 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.tssimilarity index 98%rename from tests/databaseExport.test.tsrename to packages/app-tests/databaseExport.test.tsindex 4c4e465d18..61a2be9c52 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.tssimilarity index 87%rename from tests/databaseExportSelection.test.tsrename to packages/app-tests/databaseExportSelection.test.tsindex b546b50186..60f6678c7e 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.tssimilarity index 89%rename from tests/databaseOptionSearch.test.tsrename to packages/app-tests/databaseOptionSearch.test.tsindex b2be3c307d..f9d6e6aa81 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.tssimilarity index 95%rename from tests/databaseSearch.test.tsrename to packages/app-tests/databaseSearch.test.tsindex 8c334ccac3..e2f45209de 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.tssimilarity index 87%rename from tests/databaseTree.test.tsrename to packages/app-tests/databaseTree.test.tsindex 581e30c1b4..6a509408f3 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.tssimilarity index 90%rename from tests/defaultDatabase.test.tsrename to packages/app-tests/defaultDatabase.test.tsindex 02e6115c39..d56536da49 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.tssimilarity index 94%rename from tests/diagramSvgExport.test.tsrename to packages/app-tests/diagramSvgExport.test.tsindex 1feaa9c196..0d22fa24ac 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.tssimilarity index 94%rename from tests/diagramZoom.test.tsrename to packages/app-tests/diagramZoom.test.tsindex c552b85231..dc50b59cc7 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.tssimilarity index 96%rename from tests/docsReleaseIntegration.test.tsrename to packages/app-tests/docsReleaseIntegration.test.tsindex 6a029a0394..b957eba01b 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.tssimilarity index 95%rename from tests/engineeringDiagram.test.tsrename to packages/app-tests/engineeringDiagram.test.tsindex 047d11b912..4e2b36d114 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.tssimilarity index 98%rename from tests/erDiagram.test.tsrename to packages/app-tests/erDiagram.test.tsindex ac75084bef..fb92e5bcd3 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.tssimilarity index 98%rename from tests/explainPlan.test.tsrename to packages/app-tests/explainPlan.test.tsindex b43916ecd2..cf7b2cc47c 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.tssimilarity index 98%rename from tests/fieldLineage.test.tsrename to packages/app-tests/fieldLineage.test.tsindex 7b4c0d4f0a..59167952ab 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.tssimilarity index 95%rename from tests/gridRowStatus.test.tsrename to packages/app-tests/gridRowStatus.test.tsindex d59d5eb14e..21a5ed7478 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.tssimilarity index 97%rename from tests/gridSelection.test.tsrename to packages/app-tests/gridSelection.test.tsindex 32a80ef412..7427426fed 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.tssimilarity index 94%rename from tests/historyActions.test.tsrename to packages/app-tests/historyActions.test.tsindex 474a127708..04386640c0 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.tssimilarity index 91%rename from tests/historyActivityKind.test.tsrename to packages/app-tests/historyActivityKind.test.tsindex c441b008f8..caa8f0a69d 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.tssimilarity index 97%rename from tests/historyAiAnalysis.test.tsrename to packages/app-tests/historyAiAnalysis.test.tsindex ab95003379..33fdf54682 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.tssimilarity index 92%rename from tests/historyVirtualList.test.tsrename to packages/app-tests/historyVirtualList.test.tsindex 9cb69cf225..a20c78d05d 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.tssimilarity index 96%rename from tests/keyboardShortcuts.test.tsrename to packages/app-tests/keyboardShortcuts.test.tsindex e22b02d79e..756cb6677b 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.tssimilarity index 87%rename from tests/markdownTable.test.tsrename to packages/app-tests/markdownTable.test.tsindex 8421067f81..f4db75d065 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.tssimilarity index 97%rename from tests/mongoShellCommand.test.tsrename to packages/app-tests/mongoShellCommand.test.tsindex ca2d37dd0d..b12eed17cc 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.tssimilarity index 96%rename from tests/objectRenameSql.test.tsrename to packages/app-tests/objectRenameSql.test.tsindex 5369396ef7..30fdc3131d 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.tssimilarity index 97%rename from tests/objectSourceEditor.test.tsrename to packages/app-tests/objectSourceEditor.test.tsindex 6afb73265d..fdf1c6f0e0 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.tssimilarity index 95%rename from tests/openTabsPersistence.test.tsrename to packages/app-tests/openTabsPersistence.test.tsindex c732bd43be..411b326956 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> = {}): QueryTab {return {diff --git a/tests/pinnedItems.test.ts b/packages/app-tests/pinnedItems.test.tssimilarity index 88%rename from tests/pinnedItems.test.tsrename to packages/app-tests/pinnedItems.test.tsindex 1ab334883c..3a72a21049 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.tssimilarity index 95%rename from tests/queryExecutionState.test.tsrename to packages/app-tests/queryExecutionState.test.tsindex 269c8276d4..77fd559682 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.tssimilarity index 98%rename from tests/queryResultPagination.test.tsrename to packages/app-tests/queryResultPagination.test.tsindex c7cbe809b2..7210ce49d1 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.tssimilarity index 96%rename from tests/queryResultSort.test.tsrename to packages/app-tests/queryResultSort.test.tsindex 7ed9f629dd..9d0b26333c 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.tssimilarity index 92%rename from tests/queryStore.test.tsrename to packages/app-tests/queryStore.test.tsindex a4d0ca21d9..19b67ee9c1 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.tssimilarity index 95%rename from tests/redisCommandSafety.test.tsrename to packages/app-tests/redisCommandSafety.test.tsindex 8f08227413..1957f909bc 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.tssimilarity index 97%rename from tests/redisKeyTree.test.tsrename to packages/app-tests/redisKeyTree.test.tsindex f25abc542b..5f4834f9d5 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.tssimilarity index 98%rename from tests/redisValuePresentation.test.tsrename to packages/app-tests/redisValuePresentation.test.tsindex 92fbadb81e..79f792d784 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.tssimilarity index 100%rename from tests/releasePresentation.test.tsrename to packages/app-tests/releasePresentation.test.tsdiff --git a/tests/schemaDiff.test.ts b/packages/app-tests/schemaDiff.test.tssimilarity index 96%rename from tests/schemaDiff.test.tsrename to packages/app-tests/schemaDiff.test.tsindex 889ccfc7d5..dd281760aa 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>): IndexInfo {return {diff --git a/tests/schemaOptions.test.ts b/packages/app-tests/schemaOptions.test.tssimilarity index 79%rename from tests/schemaOptions.test.tsrename to packages/app-tests/schemaOptions.test.tsindex 2fa0685080..b1c1dd0a52 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.tssimilarity index 96%rename from tests/schemaTreeCache.test.tsrename to packages/app-tests/schemaTreeCache.test.tsindex f074f38d11..3a84d40245 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.tssimilarity index 100%rename from tests/settingsDialogLayout.test.tsrename to packages/app-tests/settingsDialogLayout.test.tsdiff --git a/tests/settingsStore.test.ts b/packages/app-tests/settingsStore.test.tssimilarity index 99%rename from tests/settingsStore.test.tsrename to packages/app-tests/settingsStore.test.tsindex ebe3b5b031..1bcb23b1df 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.tssimilarity index 98%rename from tests/sidebarLayout.test.tsrename to packages/app-tests/sidebarLayout.test.tsindex b4e052b3bc..283a89142d 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.tssimilarity index 93%rename from tests/sidebarSearch.test.tsrename to packages/app-tests/sidebarSearch.test.tsindex 7176967abc..871bdd1f15 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.tssimilarity index 91%rename from tests/sidebarSearchTree.test.tsrename to packages/app-tests/sidebarSearchTree.test.tsindex 6202b6a4a9..ebd9be9753 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.tssimilarity index 96%rename from tests/sidebarTreeItemLayout.test.tsrename to packages/app-tests/sidebarTreeItemLayout.test.tsindex 17fad700aa..b22b043cda 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.tssimilarity index 98%rename from tests/sqlAnalysis.test.tsrename to packages/app-tests/sqlAnalysis.test.tsindex 4774caad1b..9b295be8df 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.tssimilarity index 99%rename from tests/sqlCompletion.test.tsrename to packages/app-tests/sqlCompletion.test.tsindex 35423b0955..ebe3b33071 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.tssimilarity index 91%rename from tests/sqlDiagnostics.test.tsrename to packages/app-tests/sqlDiagnostics.test.tsindex 7712ee82d1..1ef0f0cb4d 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.tssimilarity index 87%rename from tests/sqlExecutionTarget.test.tsrename to packages/app-tests/sqlExecutionTarget.test.tsindex ce9e8491ff..65eb23edd6 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.tssimilarity index 94%rename from tests/sqlFileOpen.test.tsrename to packages/app-tests/sqlFileOpen.test.tsindex 7473021445..31c23fa728 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.tssimilarity index 89%rename from tests/sqlFormatter.test.tsrename to packages/app-tests/sqlFormatter.test.tsindex 6f28e4a298..f64648e896 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.tssimilarity index 98%rename from tests/sqlMetadataRefresh.test.tsrename to packages/app-tests/sqlMetadataRefresh.test.tsindex be72f9beda..3662a3cbc1 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.tssimilarity index 93%rename from tests/sqlServerTree.test.tsrename to packages/app-tests/sqlServerTree.test.tsindex cab2d37155..eb132055cc 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.tssimilarity index 96%rename from tests/sqlStatementSplit.test.tsrename to packages/app-tests/sqlStatementSplit.test.tsindex 1976cdc009..298ef46e64 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.tssimilarity index 91%rename from tests/tabCloseActions.test.tsrename to packages/app-tests/tabCloseActions.test.tsindex ca68c65f59..4f550dc24a 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.tssimilarity index 91%rename from tests/tableDataExport.test.tsrename to packages/app-tests/tableDataExport.test.tsindex 6608057ae2..8ee7d9c52e 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.tssimilarity index 98%rename from tests/tableEditing.test.tsrename to packages/app-tests/tableEditing.test.tsindex 91e031e09d..4da78b0546 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.tssimilarity index 95%rename from tests/tableImport.test.tsrename to packages/app-tests/tableImport.test.tsindex b3f4b1c897..ef8d3dc563 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.tssimilarity index 97%rename from tests/tableSelectSql.test.tsrename to packages/app-tests/tableSelectSql.test.tsindex c7b3a811d3..7a39081646 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.tssimilarity index 100%rename from tests/tableStructureEditorPresentation.test.tsrename to packages/app-tests/tableStructureEditorPresentation.test.tsdiff --git a/tests/tableStructureEditorSql.test.ts b/packages/app-tests/tableStructureEditorSql.test.tssimilarity index 99%rename from tests/tableStructureEditorSql.test.tsrename to packages/app-tests/tableStructureEditorSql.test.tsindex 7788e6f5f2..618b1746ed 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>): EditableStructureColumn {return {diff --git a/tests/tableStructureEditorState.test.ts b/packages/app-tests/tableStructureEditorState.test.tssimilarity index 95%rename from tests/tableStructureEditorState.test.tsrename to packages/app-tests/tableStructureEditorState.test.tsindex e5f740895a..09229705ea 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.tssimilarity index 95%rename from tests/tableTree.test.tsrename to packages/app-tests/tableTree.test.tsindex f256d9b084..726019f952 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.tssimilarity index 85%rename from tests/tauriRuntime.test.tsrename to packages/app-tests/tauriRuntime.test.tsindex f9acd1b94f..01ecd3c572 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.tssimilarity index 90%rename from tests/transferProgressState.test.tsrename to packages/app-tests/transferProgressState.test.tsindex ba68f3ea53..5e2fd27551 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.tssimilarity index 98%rename from tests/treeNodeClick.test.tsrename to packages/app-tests/treeNodeClick.test.tsindex 3b933f6066..d1ba3f6da1 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.tssimilarity index 85%rename from tests/treeRefreshTarget.test.tsrename to packages/app-tests/treeRefreshTarget.test.tsindex 7bae715885..7185d1ea14 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.tssimilarity index 94%rename from tests/useFlatTree.test.tsrename to packages/app-tests/useFlatTree.test.tsindex 5744f37a9a..b929ff9815 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.tssimilarity index 96%rename from tests/useSqlExecution.test.tsrename to packages/app-tests/useSqlExecution.test.tsindex 602c4d5f65..26b4a31f96 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.tssimilarity index 96%rename from tests/visibleDatabases.test.tsrename to packages/app-tests/visibleDatabases.test.tsindex 65852a13db..e0216c33dc 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.tssimilarity index 94%rename from tests/xlsxExport.test.tsrename to packages/app-tests/xlsxExport.test.tsindex 261263fe8d..26b33ff23b 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({