chore: migrate test runner from node:test/tsx to vitest

155 files, 1091 tests, 4.3s (2x faster than previous 9.1s).
This commit is contained in:
t8y2 committed 2026-06-08 01:17:27 +08:00
1 parent 094dfb1f06
commit fabf2172e4
162 files changed
+431 -158

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
import assert from 'node:assert/strict'; import assert from 'node:assert/strict';
import { test } from 'node:test'; import { test } from 'vitest';
import { createUncachedUrl, releaseMetadataRequestInit } from './releaseMetadataRequest'; import { createUncachedUrl, releaseMetadataRequestInit } from './releaseMetadataRequest';
test('createUncachedUrl appends cache buster without removing existing query params', () => { test('createUncachedUrl appends cache buster without removing existing query params', () => {
+2 -1
View File
@@ -19,7 +19,7 @@
"check": "node scripts/run-check.mjs", "check": "node scripts/run-check.mjs",
"lint": "oxlint --vue-plugin apps/desktop/src", "lint": "oxlint --vue-plugin apps/desktop/src",
"fmt": "oxfmt \"apps/desktop/src/**/*.{ts,vue}\"", "fmt": "oxfmt \"apps/desktop/src/**/*.{ts,vue}\"",
"test": "tsx --tsconfig apps/desktop/tsconfig.json --test packages/app-tests/*.test.ts", "test": "vitest run",
"preview": "vite preview --config apps/desktop/vite.config.ts", "preview": "vite preview --config apps/desktop/vite.config.ts",
"tauri": "tauri", "tauri": "tauri",
"prepare": "husky" "prepare": "husky"
@@ -86,6 +86,7 @@
"tsx": "^4.22.4", "tsx": "^4.22.4",
"typescript": "~6.0.3", "typescript": "~6.0.3",
"vite": "^8.0.16", "vite": "^8.0.16",
"vitest": "^4.1.8",
"vue-tsc": "^3.3.3" "vue-tsc": "^3.3.3"
}, },
"lint-staged": { "lint-staged": {
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { shouldSuppressRepeatedActivation, tryStartExclusiveActivation } from "../../apps/desktop/src/lib/actionActivation.ts"; import { shouldSuppressRepeatedActivation, tryStartExclusiveActivation } from "../../apps/desktop/src/lib/actionActivation.ts";
test("allows the first activation", () => { test("allows the first activation", () => {
@@ -1,5 +1,5 @@
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import test from "node:test"; import { test } from "vitest";
import { showAgentDriverInstallHint } from "../../apps/desktop/src/lib/agentDriverInstallHint.ts"; import { showAgentDriverInstallHint } from "../../apps/desktop/src/lib/agentDriverInstallHint.ts";
test("hides the agent driver install hint when the selected driver is installed", () => { test("hides the agent driver install hint when the selected driver is installed", () => {
@@ -1,5 +1,5 @@
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import test from "node:test"; import { test } from "vitest";
import { import {
countAvailableAgentDriverUpdates, countAvailableAgentDriverUpdates,
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { buildAiAgentPlan } from "../../apps/desktop/src/lib/aiAgentPlan.ts"; import { buildAiAgentPlan } from "../../apps/desktop/src/lib/aiAgentPlan.ts";
import type { AiAction, AiAssistantMode } from "../../apps/desktop/src/lib/ai.ts"; import type { AiAction, AiAssistantMode } from "../../apps/desktop/src/lib/ai.ts";
import type { ConnectionConfig } from "../../apps/desktop/src/types/database.ts"; import type { ConnectionConfig } from "../../apps/desktop/src/types/database.ts";
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { buildAiAgentStepItems } from "../../apps/desktop/src/lib/aiAgentStepPresentation.ts"; import { buildAiAgentStepItems } from "../../apps/desktop/src/lib/aiAgentStepPresentation.ts";
import type { AiAgentPlan } from "../../apps/desktop/src/lib/aiAgentPlan.ts"; import type { AiAgentPlan } from "../../apps/desktop/src/lib/aiAgentPlan.ts";
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import type { AiContext } from "../../apps/desktop/src/lib/ai.ts"; import type { AiContext } from "../../apps/desktop/src/lib/ai.ts";
class MemoryStorage { class MemoryStorage {
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import type { AiAction, AiAssistantMode, AiContext } from "../../apps/desktop/src/lib/ai.ts"; import type { AiAction, AiAssistantMode, AiContext } from "../../apps/desktop/src/lib/ai.ts";
class MemoryStorage { class MemoryStorage {
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { import {
isAiPromptImeCompositionEvent, isAiPromptImeCompositionEvent,
shouldSubmitAiPromptOnKeydown, shouldSubmitAiPromptOnKeydown,
+1 -1
View File
@@ -1,5 +1,5 @@
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import test from "node:test"; import { test } from "vitest";
import { buildSystemPrompt, type AiContext } from "../../apps/desktop/src/lib/ai.ts"; import { buildSystemPrompt, type AiContext } from "../../apps/desktop/src/lib/ai.ts";
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import type { AiAction } from "../../apps/desktop/src/lib/ai.ts"; import type { AiAction } from "../../apps/desktop/src/lib/ai.ts";
import { AI_SKILL_DEFINITIONS, aiSkillForAction } from "../../apps/desktop/src/lib/aiSkills.ts"; import { AI_SKILL_DEFINITIONS, aiSkillForAction } from "../../apps/desktop/src/lib/aiSkills.ts";
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { import {
classifyAiSqlExecution, classifyAiSqlExecution,
classifyConnectionEnvironment, classifyConnectionEnvironment,
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { formatAiTableMention, parseAiTableMentions } from "../../apps/desktop/src/lib/aiTableMentions.ts"; import { formatAiTableMention, parseAiTableMentions } from "../../apps/desktop/src/lib/aiTableMentions.ts";
test("parses simple and schema-qualified AI table mentions", () => { test("parses simple and schema-qualified AI table mentions", () => {
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { import {
getTauriThemeForMode, getTauriThemeForMode,
normalizeAppThemeMode, normalizeAppThemeMode,
+1 -1
View File
@@ -1,5 +1,5 @@
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import test from "node:test"; import { test } from "vitest";
import { canDownloadAndInstallUpdate } from "../../apps/desktop/src/composables/useAppUpdater.ts"; import { canDownloadAndInstallUpdate } from "../../apps/desktop/src/composables/useAppUpdater.ts";
import type { UpdateInfo } from "../../apps/desktop/src/lib/api.ts"; import type { UpdateInfo } from "../../apps/desktop/src/lib/api.ts";
@@ -1,5 +1,5 @@
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import test from "node:test"; import { test } from "vitest";
import { import {
binaryCellDisplayText, binaryCellDisplayText,
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { cellImagePreviewUrl } from "../../apps/desktop/src/lib/cellImageUrl.ts"; import { cellImagePreviewUrl } from "../../apps/desktop/src/lib/cellImageUrl.ts";
test("detects obvious remote image URLs", () => { test("detects obvious remote image URLs", () => {
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { displayCellValue } from "../../apps/desktop/src/lib/cellValue.ts"; import { displayCellValue } from "../../apps/desktop/src/lib/cellValue.ts";
test("displayCellValue returns NULL for null", () => { test("displayCellValue returns NULL for null", () => {
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { copyToClipboard, readTextFromClipboard } from "../../apps/desktop/src/lib/clipboard.ts"; import { copyToClipboard, readTextFromClipboard } from "../../apps/desktop/src/lib/clipboard.ts";
test("copyToClipboard falls back when navigator clipboard is unavailable", async () => { test("copyToClipboard falls back when navigator clipboard is unavailable", async () => {
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { import {
applyColumnFormatter, applyColumnFormatter,
buildColumnFormatterKey, buildColumnFormatterKey,
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { import {
CONFIG_CRYPTO_UNAVAILABLE, CONFIG_CRYPTO_UNAVAILABLE,
encryptConfig, encryptConfig,
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { import {
CONNECTION_ATTEMPT_TIMEOUT_BUFFER_MS, CONNECTION_ATTEMPT_TIMEOUT_BUFFER_MS,
MONGO_LEGACY_FALLBACK_TIMEOUT_BUFFER_MS, MONGO_LEGACY_FALLBACK_TIMEOUT_BUFFER_MS,
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { parseConnectionDeepLink } from "../../apps/desktop/src/lib/connectionDeepLink.ts"; import { parseConnectionDeepLink } from "../../apps/desktop/src/lib/connectionDeepLink.ts";
test("parses dbx connection deep link query fields", () => { test("parses dbx connection deep link query fields", () => {
+1 -1
View File
@@ -1,5 +1,5 @@
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import test from "node:test"; import { test } from "vitest";
import { staleConnectionMessage, shouldMarkDisconnected } from "../../apps/desktop/src/lib/connectionHealth.ts"; import { staleConnectionMessage, shouldMarkDisconnected } from "../../apps/desktop/src/lib/connectionHealth.ts";
test("metadata connection errors should turn off connected state", () => { test("metadata connection errors should turn off connected state", () => {
@@ -1,4 +1,4 @@
import test from "node:test"; import { test } from "vitest";
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import type { ConnectionConfig } from "../../apps/desktop/src/types/database.ts"; import type { ConnectionConfig } from "../../apps/desktop/src/types/database.ts";
import { import {
@@ -1,4 +1,4 @@
import test from "node:test"; import { test } from "vitest";
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import { createPinia, setActivePinia } from "pinia"; import { createPinia, setActivePinia } from "pinia";
import { useConnectionStore } from "../../apps/desktop/src/stores/connectionStore.ts"; import { useConnectionStore } from "../../apps/desktop/src/stores/connectionStore.ts";
@@ -1,4 +1,4 @@
import test from "node:test"; import { test } from "vitest";
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import { hasEnabledTransportLayers } from "../../apps/desktop/src/lib/connectionTransport.ts"; import { hasEnabledTransportLayers } from "../../apps/desktop/src/lib/connectionTransport.ts";
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { normalizeMongoConnectionString, parseConnectionUrl } from "../../apps/desktop/src/lib/connectionUrl.ts"; import { normalizeMongoConnectionString, parseConnectionUrl } from "../../apps/desktop/src/lib/connectionUrl.ts";
test("parses postgres connection URLs", () => { test("parses postgres connection URLs", () => {
@@ -1,4 +1,4 @@
import test from "node:test"; import { test } from "vitest";
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import { connectionUrlPlaceholder } from "../../apps/desktop/src/lib/connectionPresentation.ts"; import { connectionUrlPlaceholder } from "../../apps/desktop/src/lib/connectionPresentation.ts";
+1 -1
View File
@@ -1,5 +1,5 @@
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import test from "node:test"; import { test } from "vitest";
import { import {
duckDbAttachedDatabaseNameFromPath, duckDbAttachedDatabaseNameFromPath,
uniqueDuckDbAttachedDatabaseName, uniqueDuckDbAttachedDatabaseName,
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { import {
appendColumnValueFilterCondition, appendColumnValueFilterCondition,
buildColumnValueFilterCondition, buildColumnValueFilterCondition,
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { resolveHeaderColumnType } from "../../apps/desktop/src/lib/dataGridColumnType.ts"; import { resolveHeaderColumnType } from "../../apps/desktop/src/lib/dataGridColumnType.ts";
test("prefers table-metadata type over the result type", () => { test("prefers table-metadata type over the result type", () => {
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { import {
allNullColumnIndexes, allNullColumnIndexes,
filterColumnVisibilityOptions, filterColumnVisibilityOptions,
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { calculateDataGridColumnWidth, DATA_GRID_HEADER_CONTROL_WIDTH } from "../../apps/desktop/src/lib/dataGridColumnWidth.ts"; import { calculateDataGridColumnWidth, DATA_GRID_HEADER_CONTROL_WIDTH } from "../../apps/desktop/src/lib/dataGridColumnWidth.ts";
test("reserves header control space when auto-sizing a column from the header", () => { test("reserves header control space when auto-sizing a column from the header", () => {
+1 -1
View File
@@ -1,5 +1,5 @@
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import test from "node:test"; import { test } from "vitest";
import { import {
buildDataGridCellDetail, buildDataGridCellDetail,
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { computed, nextTick, ref } from "vue"; import { computed, nextTick, ref } from "vue";
import { createPinia, setActivePinia } from "pinia"; import { createPinia, setActivePinia } from "pinia";
import { useDataGridEditor } from "../../apps/desktop/src/composables/useDataGridEditor.ts"; import { useDataGridEditor } from "../../apps/desktop/src/composables/useDataGridEditor.ts";
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { canGoNextDataGridPage } from "../../apps/desktop/src/lib/dataGridPagination.ts"; import { canGoNextDataGridPage } from "../../apps/desktop/src/lib/dataGridPagination.ts";
test("known total disables next page at the last exact page", () => { test("known total disables next page at the last exact page", () => {
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { resolveDataGridPaintTheme } from "../../apps/desktop/src/lib/dataGridPaintTheme.ts"; import { resolveDataGridPaintTheme } from "../../apps/desktop/src/lib/dataGridPaintTheme.ts";
test("canvas grid paint theme falls back from advanced CSS colors", () => { test("canvas grid paint theme falls back from advanced CSS colors", () => {
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { dataGridSaveActionMode, dataGridSaveToolbarState } from "../../apps/desktop/src/lib/dataGridSaveUi.ts"; import { dataGridSaveActionMode, dataGridSaveToolbarState } from "../../apps/desktop/src/lib/dataGridSaveUi.ts";
test("uses concise save and commit labels for the primary grid save action", () => { test("uses concise save and commit labels for the primary grid save action", () => {
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { dataGridHeaderContentWidth, scrollbarGutterWidth } from "../../apps/desktop/src/lib/dataGridScrollGutter.ts"; import { dataGridHeaderContentWidth, scrollbarGutterWidth } from "../../apps/desktop/src/lib/dataGridScrollGutter.ts";
test("calculates scrollbar gutter from element dimensions", () => { test("calculates scrollbar gutter from element dimensions", () => {
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { import {
clampSearchSplitWidth, clampSearchSplitWidth,
DEFAULT_SEARCH_SPLIT_RATIO, DEFAULT_SEARCH_SPLIT_RATIO,
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { computed, ref } from "vue"; import { computed, ref } from "vue";
import { useDataGridSelection } from "../../apps/desktop/src/composables/useDataGridSelection.ts"; import { useDataGridSelection } from "../../apps/desktop/src/composables/useDataGridSelection.ts";
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { nextDataGridSortState } from "../../apps/desktop/src/lib/dataGridSort.ts"; import { nextDataGridSortState } from "../../apps/desktop/src/lib/dataGridSort.ts";
test("cycles data grid header sort through asc, desc, and clear", () => { test("cycles data grid header sort through asc, desc, and clear", () => {
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { import {
formatTemporalInputValue, formatTemporalInputValue,
parseTemporalInputValue, parseTemporalInputValue,
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { import {
buildTransposeRows, buildTransposeRows,
buildVisibleTransposeRows, buildVisibleTransposeRows,
@@ -1,5 +1,5 @@
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import test from "node:test"; import { test } from "vitest";
import { import {
SCHEMA_AWARE_TYPES, SCHEMA_AWARE_TYPES,
TREE_SCHEMA_TYPES, TREE_SCHEMA_TYPES,
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { buildSelectedTablesPayload } from "../../apps/desktop/src/lib/databaseExportSelection.ts"; import { buildSelectedTablesPayload } from "../../apps/desktop/src/lib/databaseExportSelection.ts";
test("omits selected table payload when every table is selected", () => { test("omits selected table payload when every table is selected", () => {
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { filterDatabaseOptions } from "../../apps/desktop/src/lib/databaseOptionSearch.ts"; import { filterDatabaseOptions } from "../../apps/desktop/src/lib/databaseOptionSearch.ts";
test("returns all database options when the search query is empty", () => { test("returns all database options when the search query is empty", () => {
+1 -1
View File
@@ -1,5 +1,5 @@
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import test from "node:test"; import { test } from "vitest";
import { databaseOptionsForConnection } from "../../apps/desktop/src/composables/useDatabaseOptions.ts"; import { databaseOptionsForConnection } from "../../apps/desktop/src/composables/useDatabaseOptions.ts";
test("tree-schema connections include the default database when no catalogs are returned", () => { test("tree-schema connections include the default database when no catalogs are returned", () => {
+1 -1
View File
@@ -1,4 +1,4 @@
import test from "node:test"; import { test } from "vitest";
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import type { ColumnInfo } from "../../apps/desktop/src/types/database.ts"; import type { ColumnInfo } from "../../apps/desktop/src/types/database.ts";
import { findMatchedSearchColumns, isNumericSearchColumn, isTextSearchColumn } from "../../apps/desktop/src/lib/databaseSearch.ts"; import { findMatchedSearchColumns, isNumericSearchColumn, isTextSearchColumn } from "../../apps/desktop/src/lib/databaseSearch.ts";
+1 -1
View File
@@ -1,5 +1,5 @@
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import test from "node:test"; import { test } from "vitest";
import { import {
buildDatabaseTreeNodes, buildDatabaseTreeNodes,
buildDuckDbConnectionTreeNodes, buildDuckDbConnectionTreeNodes,
+1 -1
View File
@@ -1,5 +1,5 @@
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import test from "node:test"; import { test } from "vitest";
import { isDefaultDatabase, resolveDefaultDatabase } from "../../apps/desktop/src/lib/defaultDatabase.ts"; import { isDefaultDatabase, resolveDefaultDatabase } from "../../apps/desktop/src/lib/defaultDatabase.ts";
test("优先使用连接上已保存的默认数据库", () => { test("优先使用连接上已保存的默认数据库", () => {
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { buildEngineeringDiagram } from "../../apps/desktop/src/lib/engineeringDiagram.ts"; import { buildEngineeringDiagram } from "../../apps/desktop/src/lib/engineeringDiagram.ts";
import { import {
buildEngineeringDiagramSvg, buildEngineeringDiagramSvg,
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { import {
clampDiagramZoom, clampDiagramZoom,
zoomFromGestureScale, zoomFromGestureScale,
@@ -1,5 +1,5 @@
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import test from "node:test"; import { test } from "vitest";
import { import {
addDriverInstallQueue, addDriverInstallQueue,
@@ -1,5 +1,5 @@
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import test from "node:test"; import { test } from "vitest";
import { import {
formatRuntimeBytes, formatRuntimeBytes,
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { resolveEditorTheme } from "../../apps/desktop/src/lib/editorThemes.ts"; import { resolveEditorTheme } from "../../apps/desktop/src/lib/editorThemes.ts";
test("editor theme follows the resolved app appearance when configured to follow app theme", () => { test("editor theme follows the resolved app appearance when configured to follow app theme", () => {
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { import {
clampEditorFontSize, clampEditorFontSize,
createEditorZoomCommitScheduler, createEditorZoomCommitScheduler,
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { import {
buildElasticsearchCompletionItems, buildElasticsearchCompletionItems,
getElasticsearchCompletionContext, getElasticsearchCompletionContext,
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { buildEngineeringDiagram } from "../../apps/desktop/src/lib/engineeringDiagram.ts"; import { buildEngineeringDiagram } from "../../apps/desktop/src/lib/engineeringDiagram.ts";
import type { DiagramRelationship, DiagramTable } from "../../apps/desktop/src/lib/erDiagram.ts"; import type { DiagramRelationship, DiagramTable } from "../../apps/desktop/src/lib/erDiagram.ts";
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { import {
buildDiagramRelationships, buildDiagramRelationships,
filterDiagramTables, filterDiagramTables,
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { analyzeFieldLineage, identifierInSql, summarizeLineageCounts } from "../../apps/desktop/src/lib/fieldLineage.ts"; import { analyzeFieldLineage, identifierInSql, summarizeLineageCounts } from "../../apps/desktop/src/lib/fieldLineage.ts";
test("detects outgoing and incoming foreign key lineage as certain", () => { test("detects outgoing and incoming foreign key lineage as certain", () => {
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { matchesRowStatusFilter, rowStatusFilterAfterAddingRow, type RowStatus } from "../../apps/desktop/src/lib/gridRowStatus.ts"; import { matchesRowStatusFilter, rowStatusFilterAfterAddingRow, type RowStatus } from "../../apps/desktop/src/lib/gridRowStatus.ts";
const statuses: RowStatus[] = ["clean", "edited", "new", "deleted"]; const statuses: RowStatus[] = ["clean", "edited", "new", "deleted"];
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { import {
allCellsSelectionRange, allCellsSelectionRange,
columnSelectionRange, columnSelectionRange,
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { shouldDeleteHistoryEntry, shouldClearHistory } from "../../apps/desktop/src/lib/historyActions.ts"; import { shouldDeleteHistoryEntry, shouldClearHistory } from "../../apps/desktop/src/lib/historyActions.ts";
test("requires confirmation before deleting history entries", () => { test("requires confirmation before deleting history entries", () => {
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { resolveHistoryActivityKind } from "../../apps/desktop/src/lib/historyActivityKind.ts"; import { resolveHistoryActivityKind } from "../../apps/desktop/src/lib/historyActivityKind.ts";
test("legacy INSERT history entries are treated as data changes", () => { test("legacy INSERT history entries are treated as data changes", () => {
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { import {
buildHistoryAiAnalysisPrompt, buildHistoryAiAnalysisPrompt,
canRollbackHistoryEntry, canRollbackHistoryEntry,
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { import {
HISTORY_ROW_HEIGHT, HISTORY_ROW_HEIGHT,
HISTORY_SCROLL_BUFFER, HISTORY_SCROLL_BUFFER,
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { import {
detectLocaleFromLanguages, detectLocaleFromLanguages,
localeFromLanguageTag, localeFromLanguageTag,
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { import {
imagePreviewFitScale, imagePreviewFitScale,
clampImagePreviewScale, clampImagePreviewScale,
+1 -1
View File
@@ -1,5 +1,5 @@
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import test from "node:test"; import { test } from "vitest";
import { import {
connectionObjectTreeNodeSchema, connectionObjectTreeNodeSchema,
connectionObjectTreeQuerySchema, connectionObjectTreeQuerySchema,
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { evaluateJdbcPluginReleaseBump } from "../../.github/scripts/bump-jdbc-plugin-version.mjs"; import { evaluateJdbcPluginReleaseBump } from "../../.github/scripts/bump-jdbc-plugin-version.mjs";
import { evaluateJdbcPluginVersionChange } from "../../.github/scripts/check-jdbc-plugin-version.mjs"; import { evaluateJdbcPluginVersionChange } from "../../.github/scripts/check-jdbc-plugin-version.mjs";
import { augmentLatestJsonWithJdbcPlugin } from "../../.github/scripts/augment-latest-json-jdbc-plugin.mjs"; import { augmentLatestJsonWithJdbcPlugin } from "../../.github/scripts/augment-latest-json-jdbc-plugin.mjs";
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { import {
eventToShortcut, eventToShortcut,
isBrowserReloadShortcut, isBrowserReloadShortcut,
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { import {
mongoUrlParam, mongoUrlParam,
setMongoUrlParam, setMongoUrlParam,
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { import {
evaluateMongoAggregateSafety, evaluateMongoAggregateSafety,
mongoAggregateWriteStage, mongoAggregateWriteStage,
+1 -1
View File
@@ -1,5 +1,5 @@
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import test from "node:test"; import { test } from "vitest";
import { resolveNewQueryTarget } from "../../apps/desktop/src/lib/newQueryContext.ts"; import { resolveNewQueryTarget } from "../../apps/desktop/src/lib/newQueryContext.ts";
import type { ConnectionConfig, QueryTab, TreeNode } from "../../apps/desktop/src/types/database.ts"; import type { ConnectionConfig, QueryTab, TreeNode } from "../../apps/desktop/src/types/database.ts";
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { import {
buildObjectBrowserRows, buildObjectBrowserRows,
filterObjectBrowserRows, filterObjectBrowserRows,
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { supportsObjectRename } from "../../apps/desktop/src/lib/objectRenameSql.ts"; import { supportsObjectRename } from "../../apps/desktop/src/lib/objectRenameSql.ts";
test("recognizes object rename support for UI affordances", () => { test("recognizes object rename support for UI affordances", () => {
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { objectSourceSaveExecutionMode, supportsSourceBackedRoutineRename } from "../../apps/desktop/src/lib/objectSourceEditor.ts"; import { objectSourceSaveExecutionMode, supportsSourceBackedRoutineRename } from "../../apps/desktop/src/lib/objectSourceEditor.ts";
test("object source saves use single statement execution mode", () => { test("object source saves use single statement execution mode", () => {
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { restoreOpenTabsState, serializeOpenTabs } from "../../apps/desktop/src/lib/openTabsPersistence.ts"; import { restoreOpenTabsState, serializeOpenTabs } from "../../apps/desktop/src/lib/openTabsPersistence.ts";
import type { QueryTab } from "../../apps/desktop/src/types/database.ts"; import type { QueryTab } from "../../apps/desktop/src/types/database.ts";
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { applyPinnedTreeNodeState, orderPinnedFirst } from "../../apps/desktop/src/lib/pinnedItems.ts"; import { applyPinnedTreeNodeState, orderPinnedFirst } from "../../apps/desktop/src/lib/pinnedItems.ts";
import type { TreeNode } from "../../apps/desktop/src/types/database.ts"; import type { TreeNode } from "../../apps/desktop/src/types/database.ts";
+1 -1
View File
@@ -1,4 +1,4 @@
import test from "node:test"; import { test } from "vitest";
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import { prunePinnedTreeNodeIdsForConnection } from "../../apps/desktop/src/lib/pinnedTreeNodeIds.ts"; import { prunePinnedTreeNodeIdsForConnection } from "../../apps/desktop/src/lib/pinnedTreeNodeIds.ts";
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { import {
DBX_TABLE_REFERENCE_MIME, DBX_TABLE_REFERENCE_MIME,
activeTableReferencePayloadValue, activeTableReferencePayloadValue,
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { canCancelQueryExecution, queryExecutionLabelKey } from "../../apps/desktop/src/lib/queryExecutionState.ts"; import { canCancelQueryExecution, queryExecutionLabelKey } from "../../apps/desktop/src/lib/queryExecutionState.ts";
test("only allows cancelling an active execution with an execution id", () => { test("only allows cancelling an active execution with an execution id", () => {
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { createPinia, setActivePinia } from "pinia"; import { createPinia, setActivePinia } from "pinia";
import { isReactive } from "vue"; import { isReactive } from "vue";
import { useConnectionStore } from "../../apps/desktop/src/stores/connectionStore.ts"; import { useConnectionStore } from "../../apps/desktop/src/stores/connectionStore.ts";
+1 -1
View File
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { DEFAULT_QUERY_TIMEOUT_SECS, queryTimeoutSecsForConnection } from "../../apps/desktop/src/lib/queryTimeout.ts"; import { DEFAULT_QUERY_TIMEOUT_SECS, queryTimeoutSecsForConnection } from "../../apps/desktop/src/lib/queryTimeout.ts";
test("uses default query timeout when connection has no setting", () => { test("uses default query timeout when connection has no setting", () => {
@@ -1,4 +1,4 @@
import test from "node:test"; import { test } from "vitest";
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import { classifyRedisCommandSafety, firstRedisCommandToken } from "../../apps/desktop/src/lib/redisCommandSafety.ts"; import { classifyRedisCommandSafety, firstRedisCommandToken } from "../../apps/desktop/src/lib/redisCommandSafety.ts";
@@ -1,5 +1,5 @@
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import test from "node:test"; import { test } from "vitest";
import { import {
isRedisClearScreenCommand, isRedisClearScreenCommand,
nextRedisCommandDb, nextRedisCommandDb,
+1 -1
View File
@@ -1,5 +1,5 @@
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import test from "node:test"; import { test } from "vitest";
import { escapeRedisGlobText, redisKeySearchPattern } from "../../apps/desktop/src/lib/redisKeyPattern.ts"; import { escapeRedisGlobText, redisKeySearchPattern } from "../../apps/desktop/src/lib/redisKeyPattern.ts";
test("builds Redis key fuzzy search patterns from plain text", () => { test("builds Redis key fuzzy search patterns from plain text", () => {
+1 -1
View File
@@ -1,4 +1,4 @@
import test from "node:test"; import { test } from "vitest";
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import { import {
buildRedisKeyTree, buildRedisKeyTree,
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { import {
canEditRedisMemberDetail, canEditRedisMemberDetail,
clampRedisMemberDetailSheetWidth, clampRedisMemberDetailSheetWidth,
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { import {
buildProcedureExecutionSql, buildProcedureExecutionSql,
buildProcedureExecutionSqlFromValues, buildProcedureExecutionSqlFromValues,
+1 -1
View File
@@ -1,4 +1,4 @@
import test from "node:test"; import { test } from "vitest";
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import { hasSchemaOptionsCacheEntry } from "../../apps/desktop/src/composables/useSchemaOptions.ts"; import { hasSchemaOptionsCacheEntry } from "../../apps/desktop/src/composables/useSchemaOptions.ts";
+1 -1
View File
@@ -1,5 +1,5 @@
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import test from "node:test"; import { test } from "vitest";
import { import {
SCHEMA_TREE_CACHE_TTL_MS, SCHEMA_TREE_CACHE_TTL_MS,
decodeSchemaTreeCache, decodeSchemaTreeCache,
+1 -1
View File
@@ -1,4 +1,4 @@
import test from "node:test"; import { test } from "vitest";
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import { import {
AI_PROVIDER_PRESETS, AI_PROVIDER_PRESETS,
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import test from "node:test"; import { test } from "vitest";
import { import {
activeTabSidebarTarget, activeTabSidebarTarget,
findSidebarNodeForActiveTab, findSidebarNodeForActiveTab,
@@ -1,5 +1,5 @@
import { strict as assert } from "node:assert"; import { strict as assert } from "node:assert";
import { test } from "node:test"; import { test } from "vitest";
import { selectedConnectionDeleteTargets } from "../../apps/desktop/src/lib/sidebarConnectionSelection.ts"; import { selectedConnectionDeleteTargets } from "../../apps/desktop/src/lib/sidebarConnectionSelection.ts";
import type { TreeNode } from "../../apps/desktop/src/types/database.ts"; import type { TreeNode } from "../../apps/desktop/src/types/database.ts";
+1 -1
View File
@@ -1,4 +1,4 @@
import test from "node:test"; import { test } from "vitest";
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import { import {
reconcileLayout, reconcileLayout,
@@ -1,5 +1,5 @@
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import test from "node:test"; import { test } from "vitest";
import { sortSidebarTreeChildrenForParent } from "../../apps/desktop/src/lib/sidebarNodeOrdering.ts"; import { sortSidebarTreeChildrenForParent } from "../../apps/desktop/src/lib/sidebarNodeOrdering.ts";
import type { TreeNode } from "../../apps/desktop/src/types/database.ts"; import type { TreeNode } from "../../apps/desktop/src/types/database.ts";
Loaded 100 of 162 files, more files were not shown because too many files have changed in this diff. Show more