perf: ensure compiler options affecting semantic diagnostics get included in build info (#53423)

This commit is contained in:
David Sherret
2023-03-22 12:54:17 -04:00
committed by GitHub
parent 1df5717b12
commit 1761a67ff8
2 changed files with 12 additions and 0 deletions

View File

@@ -245,3 +245,14 @@ describe("unittests:: config:: commandLineParsing:: parseBuildOptions", () => {
assertParseResult("errors on invalid excludeFiles", ["--excludeFiles", "**/../*"]);
});
});
describe("unittests:: config:: commandLineParsing:: optionDeclarations", () => {
it("should have affectsBuildInfo true for every option with affectsSemanticDiagnostics", () => {
for (const option of ts.optionDeclarations) {
if (option.affectsSemanticDiagnostics) {
// semantic diagnostics affect the build info, so ensure they're included
assert(option.affectsBuildInfo ?? false, option.name);
}
}
});
});