Skip to content

Commit 299fc8d

Browse files
committed
test: add expected call for csv in filename
1 parent 5940ce0 commit 299fc8d

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

apps/web/src/hooks/__tests__/useInstrumentVisualization.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ describe('useInstrumentVisualization tests', () => {
9292
});
9393
act(() => dl('CSV'));
9494
expect(records).toBeDefined();
95+
expect(mockUseDownload).toHaveBeenCalledTimes(1);
96+
97+
const [filename, getContentFn] = mockUseDownload.mock.calls[0];
98+
expect(filename).toContain('.csv');
99+
const csvContents = getContentFn();
95100
});
96101
});
97102
});

0 commit comments

Comments
 (0)