From 5954e70bd7c53a9b6a1034e844c04bca088da1b9 Mon Sep 17 00:00:00 2001 From: Aleksey Kulikov Date: Thu, 12 Mar 2020 10:34:13 +0100 Subject: [PATCH] experiment with new line in problem matchers --- src/index.js | 3 ++- src/utils/problem-matchers.js | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index 73623ff8a..a9b35abdb 100644 --- a/src/index.js +++ b/src/index.js @@ -100,7 +100,8 @@ async function main() { // set failing exit code for the action if (isAssertFailed) { - core.setFailed(`Assertions have failed.`) + core.setFailed(`Assertions have failed.\nNew line starts.`) + core.setFailed(`And failed again.\nSome **bold** \`code\`.`) } core.endGroup() // Notifying diff --git a/src/utils/problem-matchers.js b/src/utils/problem-matchers.js index a039c3268..8f141a4f6 100644 --- a/src/utils/problem-matchers.js +++ b/src/utils/problem-matchers.js @@ -23,8 +23,8 @@ exports.runProblemMatchers = function enableProblemMatcher(resultsPath) { const line = 1 const severity = a.level === 'error' ? 'error' : 'warning' const message = - `${a.url} -> \`${a.auditId}\` ${a.level === 'error' ? 'failure' : 'warning'} for \`${a.name}\` assertion, ` + - `expected **${a.operator} ${a.expected}**, but found **${a.actual}**.` + `${a.url} – \`${a.auditId}\` ${a.level === 'error' ? 'failure' : 'warning'} for \`${a.name}\` assertion, ` + + `expected ${a.operator} ${a.expected}, but found ${a.actual}.` console.log(`${file}|${line}|${severity}|${message}`) }) })