fix(tests): format document field search spec
This commit is contained in:
1 parent
a23f516395
commit
9bacb752e4
1 file changed
+10
-9
+10
-9
@@ -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",
|
||||
|
||||
Reference in new issue
Block a user