Skip to content

Commit e8afa54

Browse files
Fix test by mocking the correct function
1 parent 59958a5 commit e8afa54

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

extensions/ql-vscode/test/vscode-tests/no-workspace/query-history/query-history-manager.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -709,13 +709,13 @@ describe("QueryHistoryManager", () => {
709709
});
710710

711711
it("should copy repo list for a single variant analysis", async () => {
712+
variantAnalysisManagerStub.copyRepoListToClipboard = jest.fn();
712713
queryHistoryManager = await createMockQueryHistory(allHistory);
713-
queryHistoryManager.handleCopyRepoList = jest.fn();
714714

715715
const item = variantAnalysisHistory[1];
716716
await queryHistoryManager.handleCopyRepoList(item);
717717

718-
expect(queryHistoryManager.handleCopyRepoList).toBeCalledWith(
718+
expect(variantAnalysisManagerStub.copyRepoListToClipboard).toBeCalledWith(
719719
item.variantAnalysis.id,
720720
);
721721
});

0 commit comments

Comments
 (0)