Skip to content

Commit dc6de0f

Browse files
committed
Fix async describes
1 parent e5967c3 commit dc6de0f

3 files changed

Lines changed: 25 additions & 25 deletions

File tree

extensions/ql-vscode/src/vscode-tests/cli-integration/remote-queries/variant-analysis-manager.test.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ import {
5757
// up to 3 minutes per test
5858
jest.setTimeout(3 * 60 * 1000);
5959

60-
describe("Variant Analysis Manager", async () => {
60+
describe("Variant Analysis Manager", () => {
6161
const pathExistsStub = jest.spyOn(fs, "pathExists");
6262
const readJsonStub = jest.spyOn(fs, "readJson");
6363
const outputJsonStub = jest.spyOn(fs, "outputJson");
@@ -405,7 +405,7 @@ describe("Variant Analysis Manager", async () => {
405405
});
406406
});
407407

408-
describe("when credentials are invalid", async () => {
408+
describe("when credentials are invalid", () => {
409409
beforeEach(async () => {
410410
jest
411411
.spyOn(Credentials, "initialize")
@@ -425,7 +425,7 @@ describe("Variant Analysis Manager", async () => {
425425
});
426426
});
427427

428-
describe("when credentials are valid", async () => {
428+
describe("when credentials are valid", () => {
429429
let arrayBuffer: ArrayBuffer;
430430

431431
const getVariantAnalysisRepoStub = jest.spyOn(
@@ -456,7 +456,7 @@ describe("Variant Analysis Manager", async () => {
456456
getVariantAnalysisRepoResultStub.mockReset();
457457
});
458458

459-
describe("when the artifact_url is missing", async () => {
459+
describe("when the artifact_url is missing", () => {
460460
beforeEach(async () => {
461461
const dummyRepoTask = createMockVariantAnalysisRepoTask();
462462
delete dummyRepoTask.artifact_url;
@@ -476,7 +476,7 @@ describe("Variant Analysis Manager", async () => {
476476
});
477477
});
478478

479-
describe("when the artifact_url is present", async () => {
479+
describe("when the artifact_url is present", () => {
480480
let dummyRepoTask: VariantAnalysisRepoTask;
481481

482482
beforeEach(async () => {
@@ -486,7 +486,7 @@ describe("Variant Analysis Manager", async () => {
486486
getVariantAnalysisRepoResultStub.mockResolvedValue(arrayBuffer);
487487
});
488488

489-
describe("autoDownloadVariantAnalysisResult", async () => {
489+
describe("autoDownloadVariantAnalysisResult", () => {
490490
it("should return early if variant analysis is cancelled", async () => {
491491
cancellationTokenSource.cancel();
492492

@@ -754,7 +754,7 @@ describe("Variant Analysis Manager", async () => {
754754
});
755755
});
756756

757-
describe("enqueueDownload", async () => {
757+
describe("enqueueDownload", () => {
758758
it("should pop download tasks off the queue", async () => {
759759
const getResultsSpy = jest.spyOn(
760760
variantAnalysisManager,
@@ -782,7 +782,7 @@ describe("Variant Analysis Manager", async () => {
782782
});
783783
});
784784

785-
describe("removeVariantAnalysis", async () => {
785+
describe("removeVariantAnalysis", () => {
786786
const removeAnalysisResultsStub = jest.spyOn(
787787
variantAnalysisResultsManager,
788788
"removeAnalysisResults",
@@ -814,7 +814,7 @@ describe("Variant Analysis Manager", async () => {
814814
});
815815
});
816816

817-
describe("when rehydrating a query", async () => {
817+
describe("when rehydrating a query", () => {
818818
let variantAnalysis: VariantAnalysis;
819819
const variantAnalysisRemovedSpy = jest.fn();
820820
const executeCommandSpy = jest.spyOn(commands, "executeCommand");
@@ -830,7 +830,7 @@ describe("Variant Analysis Manager", async () => {
830830
executeCommandSpy.mockReset().mockResolvedValue(undefined);
831831
});
832832

833-
describe("when variant analysis record doesn't exist", async () => {
833+
describe("when variant analysis record doesn't exist", () => {
834834
it("should remove the variant analysis", async () => {
835835
await variantAnalysisManager.rehydrateVariantAnalysis(variantAnalysis);
836836
expect(variantAnalysisRemovedSpy).toHaveBeenCalledTimes(1);
@@ -842,7 +842,7 @@ describe("Variant Analysis Manager", async () => {
842842
});
843843
});
844844

845-
describe("when variant analysis record does exist", async () => {
845+
describe("when variant analysis record does exist", () => {
846846
let variantAnalysisStorageLocation: string;
847847

848848
beforeEach(async () => {
@@ -857,7 +857,7 @@ describe("Variant Analysis Manager", async () => {
857857
fs.rmSync(variantAnalysisStorageLocation, { recursive: true });
858858
});
859859

860-
describe("when the variant analysis is not complete", async () => {
860+
describe("when the variant analysis is not complete", () => {
861861
beforeEach(() => {
862862
jest
863863
.spyOn(VariantAnalysisModule, "isVariantAnalysisComplete")
@@ -882,7 +882,7 @@ describe("Variant Analysis Manager", async () => {
882882
});
883883
});
884884

885-
describe("when the variant analysis is complete", async () => {
885+
describe("when the variant analysis is complete", () => {
886886
beforeEach(() => {
887887
jest
888888
.spyOn(VariantAnalysisModule, "isVariantAnalysisComplete")
@@ -906,7 +906,7 @@ describe("Variant Analysis Manager", async () => {
906906
});
907907
});
908908

909-
describe("cancelVariantAnalysis", async () => {
909+
describe("cancelVariantAnalysis", () => {
910910
let variantAnalysis: VariantAnalysis;
911911
const mockCancelVariantAnalysis = jest.spyOn(
912912
ghActionsApiClient,
@@ -1005,7 +1005,7 @@ describe("Variant Analysis Manager", async () => {
10051005
});
10061006
});
10071007

1008-
describe("copyRepoListToClipboard", async () => {
1008+
describe("copyRepoListToClipboard", () => {
10091009
let variantAnalysis: VariantAnalysis;
10101010
let variantAnalysisStorageLocation: string;
10111011

extensions/ql-vscode/src/vscode-tests/cli-integration/remote-queries/variant-analysis-monitor.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import { VariantAnalysisManager } from "../../../remote-queries/variant-analysis
3535

3636
jest.setTimeout(60_000);
3737

38-
describe("Variant Analysis Monitor", async () => {
38+
describe("Variant Analysis Monitor", () => {
3939
let extension: CodeQLExtensionInterface | Record<string, never>;
4040
const mockGetVariantAnalysis = jest.spyOn(ghApiClient, "getVariantAnalysis");
4141
let cancellationTokenSource: CancellationTokenSource;
@@ -83,7 +83,7 @@ describe("Variant Analysis Monitor", async () => {
8383
limitNumberOfAttemptsToMonitor();
8484
});
8585

86-
describe("when credentials are invalid", async () => {
86+
describe("when credentials are invalid", () => {
8787
beforeEach(async () => {
8888
jest
8989
.spyOn(Credentials, "initialize")
@@ -102,7 +102,7 @@ describe("Variant Analysis Monitor", async () => {
102102
});
103103
});
104104

105-
describe("when credentials are valid", async () => {
105+
describe("when credentials are valid", () => {
106106
beforeEach(async () => {
107107
const mockCredentials = {
108108
getOctokit: () =>
@@ -124,7 +124,7 @@ describe("Variant Analysis Monitor", async () => {
124124
expect(result).toEqual({ status: "Canceled" });
125125
});
126126

127-
describe("when the variant analysis fails", async () => {
127+
describe("when the variant analysis fails", () => {
128128
let mockFailedApiResponse: VariantAnalysisApiResponse;
129129

130130
beforeEach(async () => {
@@ -163,12 +163,12 @@ describe("Variant Analysis Monitor", async () => {
163163
});
164164
});
165165

166-
describe("when the variant analysis is in progress", async () => {
166+
describe("when the variant analysis is in progress", () => {
167167
let mockApiResponse: VariantAnalysisApiResponse;
168168
let scannedRepos: ApiVariantAnalysisScannedRepository[];
169169
let succeededRepos: ApiVariantAnalysisScannedRepository[];
170170

171-
describe("when there are successfully scanned repos", async () => {
171+
describe("when there are successfully scanned repos", () => {
172172
beforeEach(async () => {
173173
scannedRepos = createMockScannedRepos([
174174
"pending",
@@ -241,7 +241,7 @@ describe("Variant Analysis Monitor", async () => {
241241
});
242242
});
243243

244-
describe("when there are only in progress repos", async () => {
244+
describe("when there are only in progress repos", () => {
245245
let scannedRepos: ApiVariantAnalysisScannedRepository[];
246246

247247
beforeEach(async () => {
@@ -270,7 +270,7 @@ describe("Variant Analysis Monitor", async () => {
270270
});
271271
});
272272

273-
describe("when there are no repos to scan", async () => {
273+
describe("when there are no repos to scan", () => {
274274
beforeEach(async () => {
275275
scannedRepos = [];
276276
mockApiResponse = createMockApiResponse("succeeded", scannedRepos);

extensions/ql-vscode/src/vscode-tests/cli-integration/remote-queries/variant-analysis-results-manager.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ describe(VariantAnalysisResultsManager.name, () => {
8585
});
8686
});
8787

88-
describe("when the artifact_url is missing", async () => {
88+
describe("when the artifact_url is missing", () => {
8989
it("should not try to download the result", async () => {
9090
const dummyRepoTask = createMockVariantAnalysisRepositoryTask();
9191
delete dummyRepoTask.artifactUrl;
@@ -105,7 +105,7 @@ describe(VariantAnalysisResultsManager.name, () => {
105105
});
106106
});
107107

108-
describe("when the artifact_url is present", async () => {
108+
describe("when the artifact_url is present", () => {
109109
let arrayBuffer: ArrayBuffer;
110110

111111
const getVariantAnalysisRepoResultStub = jest.spyOn(

0 commit comments

Comments
 (0)