Skip to content

Commit 0620bff

Browse files
bartlomiejuclaude
andauthored
ci: use code blocks for test lists in Node compat Slack messages (#32103)
## Summary - Format newly passing, newly failing, and flaky test lists in the Node compat Slack thread as code blocks (triple backticks) instead of inline code for improved readability Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 61a034e commit 0620bff

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

tests/node_compat/slack.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -294,27 +294,29 @@ async function generateThreadBlocks(
294294
const sorted = [...newlyPassing.entries()].sort(([a], [b]) =>
295295
a.localeCompare(b)
296296
);
297-
let text = `*Newly Passing (${sorted.length}):*\n`;
297+
let text = `*Newly Passing (${sorted.length}):*\n\`\`\`\n`;
298298
for (const [testName, oses] of sorted.slice(0, MAX_NEWLY_PASSING)) {
299-
text += `\`${testName}\` (${formatOsList(oses)})\n`;
299+
text += `${testName} (${formatOsList(oses)})\n`;
300300
}
301301
if (sorted.length > MAX_NEWLY_PASSING) {
302-
text += `_...and ${sorted.length - MAX_NEWLY_PASSING} more_\n`;
302+
text += `...and ${sorted.length - MAX_NEWLY_PASSING} more\n`;
303303
}
304+
text += `\`\`\``;
304305
blocks.push({ type: "section", text: { type: "mrkdwn", text } });
305306
}
306307

307308
if (newlyFailing.size > 0) {
308309
const sorted = [...newlyFailing.entries()].sort(([a], [b]) =>
309310
a.localeCompare(b)
310311
);
311-
let text = `*Started Failing (${sorted.length}):*\n`;
312+
let text = `*Started Failing (${sorted.length}):*\n\`\`\`\n`;
312313
for (const [testName, oses] of sorted.slice(0, MAX_NEWLY_FAILING)) {
313-
text += `\`${testName}\` (${formatOsList(oses)})\n`;
314+
text += `${testName} (${formatOsList(oses)})\n`;
314315
}
315316
if (sorted.length > MAX_NEWLY_FAILING) {
316-
text += `_...and ${sorted.length - MAX_NEWLY_FAILING} more_\n`;
317+
text += `...and ${sorted.length - MAX_NEWLY_FAILING} more\n`;
317318
}
319+
text += `\`\`\``;
318320
blocks.push({ type: "section", text: { type: "mrkdwn", text } });
319321
}
320322

@@ -324,17 +326,18 @@ async function generateThreadBlocks(
324326
);
325327
let text = `*Flaky Tests (last ${
326328
FLAKY_HISTORY_DAYS + 1
327-
} runs, ${sorted.length} tests):*\n`;
329+
} runs, ${sorted.length} tests):*\n\`\`\`\n`;
328330
for (const [testName, osStats] of sorted.slice(0, MAX_FLAKY)) {
329331
const parts: string[] = [];
330332
for (const [os, stats] of osStats) {
331333
parts.push(`${os}: ${stats.pass}/${stats.total}`);
332334
}
333-
text += `\`${testName}\` ${parts.join(", ")}\n`;
335+
text += `${testName} ${parts.join(", ")}\n`;
334336
}
335337
if (sorted.length > MAX_FLAKY) {
336-
text += `_...and ${sorted.length - MAX_FLAKY} more_\n`;
338+
text += `...and ${sorted.length - MAX_FLAKY} more\n`;
337339
}
340+
text += `\`\`\``;
338341
blocks.push({ type: "section", text: { type: "mrkdwn", text } });
339342
}
340343

0 commit comments

Comments
 (0)