Skip to content

Commit 20b127c

Browse files
committed
Make it possible to cancel a mock local query
We're going to add tests to check that we cancel a remote query. We'll need a `.cancel` method to be present on our mock local queries for this.
1 parent 620cc39 commit 20b127c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

extensions/ql-vscode/src/vscode-tests/factories/local-queries/local-query-history-item.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export function createMockLocalQueryInfo({
4747
const localQuery = new LocalQueryInfo(initialQueryInfo, cancellationToken);
4848

4949
localQuery.failureReason = failureReason;
50+
localQuery.cancel = () => { /**/ };
5051

5152
if (queryWithResults) {
5253
localQuery.completeThisQuery(queryWithResults);

0 commit comments

Comments
 (0)