From b62df3280b141af763386a68b0b4e386bef907e7 Mon Sep 17 00:00:00 2001 From: Moshe Atlow Date: Tue, 28 Feb 2023 13:03:29 +0200 Subject: [PATCH] fix(github): remove redundant diagnostics --- packages/github/index.js | 3 ++- packages/github/tests/output.js | 7 ------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/github/index.js b/packages/github/index.js index 9d5bfc9..a4462a4 100644 --- a/packages/github/index.js +++ b/packages/github/index.js @@ -64,9 +64,10 @@ module.exports = async function githubReporter(source) { counter.fail += 1; break; } case 'test:diagnostic': - core.notice(event.data.message, { file: getFilePath(event.data.file) }); if (event.data.nesting === 0) { diagnostics.push(event.data.message); + } else { + core.notice(event.data.message, { file: getFilePath(event.data.file) }); } break; default: diff --git a/packages/github/tests/output.js b/packages/github/tests/output.js index 6bb2739..4f3d4d9 100644 --- a/packages/github/tests/output.js +++ b/packages/github/tests/output.js @@ -5,13 +5,6 @@ module.exports = { ::debug::starting to run fails ::error title=fails,file=tests/example.js::\\[Error \\[ERR_TEST_FAILURE\\]: this is an error\\] {%0A failureType: 'testCodeFailure',%0A cause: Error: this is an error%0A at Object. (.*/example.js:6:11).* ::error title=tests,file=tests/example.js::\\[Error \\[ERR_TEST_FAILURE\\]: 1 subtest failed\\] { failureType: 'subtestsFailed', cause: '1 subtest failed', code: 'ERR_TEST_FAILURE' } -::notice file=tests/example.js::tests 1 -::notice file=tests/example.js::pass 0 -::notice file=tests/example.js::fail 1 -::notice file=tests/example.js::cancelled 0 -::notice file=tests/example.js::skipped 0 -::notice file=tests/example.js::todo 0 -::notice file=tests/example.js::duration_ms .* ::group::Test results \\(1 passed, 2 failed\\) ::notice::Total Tests: 1%0APassed ✅: 0%0AFailed ❌: 1%0ACanceled 🚫: 0%0ASkipped ⏭️: 0%0ATodo 📝: 0%0ADuration: .*ms ::endgroup::