We introduced this change to help with reducing flakiness in CI [1]. This has a slightly different effect locally, where every failed test will output three times. This in turn makes it harder to read, especially when you have multiple failing tests. Since the original intent for this behaviour was to be used in CI, I'm proposing we disable it when the CI env variable isn't set. I've opted to set it for all jobs involving tests, just for consistency. I'm happy to limit it to just the places where it's required. [1]: https://github.com/github/vscode-codeql/pull/2059
15 lines
285 B
TypeScript
15 lines
285 B
TypeScript
import { env } from "vscode";
|
|
import { beforeEachAction } from "./test-config";
|
|
|
|
if (process.env.CI) {
|
|
jest.retryTimes(3, {
|
|
logErrorsBeforeRetry: true,
|
|
});
|
|
}
|
|
|
|
beforeEach(async () => {
|
|
jest.spyOn(env, "openExternal").mockResolvedValue(false);
|
|
|
|
await beforeEachAction();
|
|
});
|