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.
This commit is contained in:
Koen Vlaswinkel
2023-02-10 10:43:48 +00:00
parent 642b8e5960
commit ce56e6f038
2 changed files with 8 additions and 0 deletions

View File

@@ -15,6 +15,10 @@ import { beforeEachAction } from "./test-config";
// create an extension storage location
let removeStorage: tmp.DirResult["removeCallback"] | undefined;
jest.retryTimes(3, {
logErrorsBeforeRetry: true,
});
beforeAll(async () => {
// Set the CLI version here before activation to ensure we don't accidentally try to download a cli
await beforeEachAction();

View File

@@ -1,6 +1,10 @@
import { env } from "vscode";
import { beforeEachAction } from "./test-config";
jest.retryTimes(3, {
logErrorsBeforeRetry: true,
});
beforeEach(async () => {
jest.spyOn(env, "openExternal").mockResolvedValue(false);