Skip to content

Commit d9b1f1a

Browse files
committed
retry failing test
1 parent d94d542 commit d9b1f1a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/test/suite/config.test.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ import {
66
putBackPrettierRC,
77
} from "./format.test";
88

9-
const testConfig = (testPath: string, resultPath: string) => {
9+
const testConfig = (
10+
testPath: string,
11+
resultPath: string,
12+
shouldRetry = false,
13+
) => {
1014
return async () => {
11-
const { actual } = await format("config", testPath);
15+
const { actual } = await format("config", testPath, shouldRetry);
1216
const expected = await getText("config", resultPath);
1317
assert.equal(actual, expected);
1418
};
@@ -21,7 +25,8 @@ suite("Test configurations", function () {
2125
test(
2226
"it uses config from .prettierrc file and does not inherit VS Code settings ",
2327
/* cspell: disable-next-line */
24-
testConfig("rcfile/test.js", "rcfile/test.result.js"),
28+
// Use retry for first test as extension may need time after root .prettierrc is moved
29+
testConfig("rcfile/test.js", "rcfile/test.result.js", true),
2530
);
2631
test(
2732
"it uses config from prettier.config.js file ",

0 commit comments

Comments
 (0)