Skip to content

Commit 72e09da

Browse files
committed
Show output of panic found when updating fourslash tests and run them with -v so we can diagnose which test is failing
1 parent 3a76f2a commit 72e09da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/fourslash/_scripts/updateFailing.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ function main() {
1313
const go = which.sync("go");
1414
let testOutput: string;
1515
try {
16-
testOutput = cp.execFileSync(go, ["test", "./internal/fourslash/tests/gen"], { encoding: "utf-8" });
16+
testOutput = cp.execFileSync(go, ["test", "-v", "./internal/fourslash/tests/gen"], { encoding: "utf-8" });
1717
}
1818
catch (error) {
1919
testOutput = (error as { stdout: string; }).stdout as string;
2020
}
2121
const panicRegex = /^panic/m;
2222
if (panicRegex.test(testOutput)) {
2323
fs.writeFileSync(failingTestsPath, oldFailingTests, "utf-8");
24-
throw new Error("Unrecovered panic detected in tests");
24+
throw new Error("Unrecovered panic detected in tests\n" + testOutput);
2525
}
2626
const failRegex = /--- FAIL: ([\S]+)/gm;
2727
const failingTests: string[] = [];

0 commit comments

Comments
 (0)