Skip to content

Commit 445cb90

Browse files
authored
feat: improve markdown output (#14)
1 parent e72b5d4 commit 445cb90

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/notifications.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ export const createComment = async (
4848
body: `## ${getTitle(label)}: ${result.passed ? 'Success' : 'Failure'}
4949
${result.summary}
5050
51+
\`\`\`
5152
${result.output}
53+
\`\`\`
5254
`,
5355
});
5456
};

src/processing.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ const compareTolerance = (expected: Inputs.Tolerance, result: Inputs.Tolerance):
2626

2727
const getSummary = (passed: boolean, expected: Inputs.Tolerance, result: Inputs.Tolerance): string => {
2828
if (!passed) {
29-
return `Expected tolerance '${expected}' but got '${result}' instead`;
29+
return `Expected tolerance \`${expected}\` but got \`${result}\` instead`;
3030
}
31-
return `Check succeeded with tolerance '${result}' (expected '${expected}' or better)`;
31+
return `Check succeeded with tolerance \`${result}\` (expected \`${expected}\` or better)`;
3232
};
3333

3434
export const processDiff = (old: string, newPath: string, mode: Inputs.Mode, expected: Inputs.Tolerance): Result => {

0 commit comments

Comments
 (0)