Fix test by mocking the correct function

This commit is contained in:
Robert
2023-07-28 10:26:52 +01:00
parent 59958a5b32
commit e8afa54584

View File

@@ -709,13 +709,13 @@ describe("QueryHistoryManager", () => {
});
it("should copy repo list for a single variant analysis", async () => {
variantAnalysisManagerStub.copyRepoListToClipboard = jest.fn();
queryHistoryManager = await createMockQueryHistory(allHistory);
queryHistoryManager.handleCopyRepoList = jest.fn();
const item = variantAnalysisHistory[1];
await queryHistoryManager.handleCopyRepoList(item);
expect(queryHistoryManager.handleCopyRepoList).toBeCalledWith(
expect(variantAnalysisManagerStub.copyRepoListToClipboard).toBeCalledWith(
item.variantAnalysis.id,
);
});