Merge pull request #2059 from github/koesie10/retry-tests

Retry VSCode integration tests
This commit is contained in:
Koen Vlaswinkel
2023-02-15 10:44:03 +01:00
committed by GitHub
2 changed files with 8 additions and 0 deletions

View File

@@ -2,6 +2,10 @@ import { CUSTOM_CODEQL_PATH_SETTING } from "../../src/config";
import { ConfigurationTarget, env, extensions } from "vscode";
import { beforeEachAction as testConfigBeforeEachAction } from "./test-config";
jest.retryTimes(3, {
logErrorsBeforeRetry: true,
});
export async function beforeAllAction() {
// Set the CLI version here before activation to ensure we don't accidentally try to download a cli
await testConfigBeforeEachAction();

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);