Skip to content

Commit 9202ceb

Browse files
committed
test: tolerate Markdown line wrapping in doc checks
1 parent b130cd4 commit 9202ceb

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎scripts/check-consumer-docs.mjs‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,16 @@ for (const relativePath of surfaces) {
4444
}
4545

4646
const usage = readFileSync(join(root, "docs/github-action-usage.md"), "utf8");
47-
if (currentTag && !usage.includes(`uses: daichunghy/patchgate@${currentTag}`)) {
47+
const normalizedUsage = usage.replace(/\\s+/g, " ");
48+
if (currentTag && !normalizedUsage.includes(`uses: daichunghy/patchgate@${currentTag}`)) {
4849
failures.push(
4950
"docs/github-action-usage.md must pin the current public release in consumer examples",
5051
);
5152
}
52-
if (usage.includes("beta.2 posts a Check Run")) {
53+
if (normalizedUsage.includes("beta.2 posts a Check Run")) {
5354
failures.push("docs/github-action-usage.md contains the stale beta.2 Check Run claim");
5455
}
55-
if (!usage.includes("snapshot-rejection Check Runs are included in the public beta")) {
56+
if (!normalizedUsage.includes("snapshot-rejection Check Runs are included in the public beta")) {
5657
failures.push(
5758
"docs/github-action-usage.md must describe snapshot-rejection Check Run behavior without a release-specific claim",
5859
);

0 commit comments

Comments
 (0)