Skip to content

Commit ce56e6f

Browse files
committed
Retry VSCode integration tests
This will call `jest.retryTimes` to retry the VSCode integration tests up to 3 times. This should help with the flaky tests.
1 parent 642b8e5 commit ce56e6f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

extensions/ql-vscode/test/vscode-tests/jest.activated-extension.setup.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ import { beforeEachAction } from "./test-config";
1515
// create an extension storage location
1616
let removeStorage: tmp.DirResult["removeCallback"] | undefined;
1717

18+
jest.retryTimes(3, {
19+
logErrorsBeforeRetry: true,
20+
});
21+
1822
beforeAll(async () => {
1923
// Set the CLI version here before activation to ensure we don't accidentally try to download a cli
2024
await beforeEachAction();

extensions/ql-vscode/test/vscode-tests/jest.setup.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import { env } from "vscode";
22
import { beforeEachAction } from "./test-config";
33

4+
jest.retryTimes(3, {
5+
logErrorsBeforeRetry: true,
6+
});
7+
48
beforeEach(async () => {
59
jest.spyOn(env, "openExternal").mockResolvedValue(false);
610

0 commit comments

Comments
 (0)