Skip to content

Commit 0639c66

Browse files
committed
Change createMockRemoteQueryHistoryItem to receive resultCount and startTime
Again, we'll need these for sorting. We also want to be able to set/unset a userSpecifiedLabel. Since this factory method is used in `history-item-label-provider.test.ts`, we have tests there that count on this custom label being defined/undefined.
1 parent 44aeaf7 commit 0639c66

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,18 @@ export function createMockRemoteQueryHistoryItem({
55
date = new Date('2022-01-01T00:00:00.000Z'),
66
status = QueryStatus.InProgress,
77
failureReason = undefined,
8-
resultCount = 16,
8+
resultCount = undefined,
99
repositoryCount = 0,
10-
userSpecifiedLabel = undefined,
10+
executionStartTime = date.getTime(),
11+
userSpecifiedLabel = undefined
1112
}: {
1213
date?: Date;
1314
status?: QueryStatus;
1415
failureReason?: string;
1516
resultCount?: number;
1617
repositoryCount?: number;
18+
repositories?: string[];
19+
executionStartTime?: number;
1720
userSpecifiedLabel?: string;
1821
}): RemoteQueryHistoryItem {
1922
return ({
@@ -32,7 +35,7 @@ export function createMockRemoteQueryHistoryItem({
3235
owner: 'github',
3336
name: 'vscode-codeql-integration-tests',
3437
},
35-
executionStartTime: date.getTime(),
38+
executionStartTime,
3639
actionsWorkflowRunId: 1,
3740
repositoryCount,
3841
},

0 commit comments

Comments
 (0)