From 9bacb752e45e1bdb19235dc5edf37e56650144bf Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Wed, 12 Aug 2026 05:22:36 +0000 Subject: [PATCH] fix(tests): format document field search spec --- .../DocumentBrowserFieldSearch.spec.ts | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) 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>; - mongo_copy_documents?: unknown[]; - } | undefined>) + | ((onProgress?: (info: { rowsExported: number; totalRows: number | null }) => void) => Promise< + | { + columns: string[]; + column_types?: string[]; + rows: Array>; + 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",