Skip to content

armgit / dbx

Public Imported from GitHub
0

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。

fix(tests): format document field search spec

t8y29bacb752e45e
diff --git a/apps/desktop/src/components/document/__tests__/DocumentBrowserFieldSearch.spec.ts b/apps/desktop/src/components/document/__tests__/DocumentBrowserFieldSearch.spec.ts
index b5dcce2a6d..fc10eb264f 100644
--- a/apps/desktop/src/components/document/__tests__/DocumentBrowserFieldSearch.spec.ts
+++ b/apps/desktop/src/components/document/__tests__/DocumentBrowserFieldSearch.spec.ts
@@ -17,12 +17,15 @@ const documentJsonEditor = vi.hoisted(() => ({
const dataGrid = vi.hoisted(() => ({
fullExportResult: undefined as
- | ((onProgress?: (info: { rowsExported: number; totalRows: number | null }) => void) => Promise<{
- columns: string[];
- column_types?: string[];
- rows: Array<Array<string | number | boolean | null>>;
- mongo_copy_documents?: unknown[];
- } | undefined>)
+ | ((onProgress?: (info: { rowsExported: number; totalRows: number | null }) => void) => Promise<
+ | {
+ columns: string[];
+ column_types?: string[];
+ rows: Array<Array<string | number | boolean | null>>;
+ mongo_copy_documents?: unknown[];
+ }
+ | undefined
+ >)
| undefined,
}));
@@ -505,9 +508,7 @@ describe("DocumentBrowser MongoDB filter value types", () => {
it("stops MongoDB full export on a short page when the total is estimated", async () => {
app?.unmount();
backend.documentFindDocuments.mockReset();
- backend.documentFindDocuments
- .mockResolvedValueOnce({ documents: [{ _id: "visible" }], total: 500, total_is_exact: false })
- .mockResolvedValueOnce({ documents: [{ _id: "only" }], total: 500, total_is_exact: false });
+ backend.documentFindDocuments.mockResolvedValueOnce({ documents: [{ _id: "visible" }], total: 500, total_is_exact: false }).mockResolvedValueOnce({ documents: [{ _id: "only" }], total: 500, total_is_exact: false });
app = createApp(DocumentBrowser, {
connectionId: "mongo-1",
database: "test",