From 6ca0156f79a801d049caedaf2f16cd83adce9e58 Mon Sep 17 00:00:00 2001 From: devholic22 Date: Thu, 28 Aug 2025 21:42:46 +0900 Subject: [PATCH 1/2] fix: remove failure attribute --- lib/internal/test_runner/reporter/junit.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/internal/test_runner/reporter/junit.js b/lib/internal/test_runner/reporter/junit.js index 24bbd9ffc3e1cc..3ff46306806545 100644 --- a/lib/internal/test_runner/reporter/junit.js +++ b/lib/internal/test_runner/reporter/junit.js @@ -138,7 +138,6 @@ module.exports = async function* junitReporter(source) { children: [inspectWithNoCustomRetry(error, inspectOptions)], }); currentTest.failures = 1; - currentTest.attrs.failure = error?.message ?? ''; } } break; From dc807aa8eb91e9d7da15c41c465775f50b02b522 Mon Sep 17 00:00:00 2001 From: devholic22 Date: Sat, 30 Aug 2025 12:44:29 +0900 Subject: [PATCH 2/2] fix: update junit_reporter.snapshot for pass test --- .../output/junit_reporter.snapshot | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/test/fixtures/test-runner/output/junit_reporter.snapshot b/test/fixtures/test-runner/output/junit_reporter.snapshot index 37cea45d62bd84..0a30e56957912d 100644 --- a/test/fixtures/test-runner/output/junit_reporter.snapshot +++ b/test/fixtures/test-runner/output/junit_reporter.snapshot @@ -6,7 +6,7 @@ - + [Error [ERR_TEST_FAILURE]: thrown from sync fail todo] { @@ -23,7 +23,7 @@ } - + [Error [ERR_TEST_FAILURE]: thrown from sync fail todo with message] { @@ -48,7 +48,7 @@ - + [Error [ERR_TEST_FAILURE]: thrown from sync throw fail] { code: 'ERR_TEST_FAILURE', @@ -68,7 +68,7 @@ - + [Error [ERR_TEST_FAILURE]: thrown from async throw fail] { code: 'ERR_TEST_FAILURE', @@ -84,7 +84,7 @@ } - + [Error [ERR_TEST_FAILURE]: thrown from async throw fail] { @@ -101,7 +101,7 @@ } - + [Error [ERR_TEST_FAILURE]: Expected values to be strictly equal: @@ -131,7 +131,7 @@ true !== false - + [Error [ERR_TEST_FAILURE]: rejected from reject fail] { code: 'ERR_TEST_FAILURE', @@ -153,7 +153,7 @@ true !== false - + Error [ERR_TEST_FAILURE]: thrown from subtest sync throw fail * @@ -176,7 +176,7 @@ Error [ERR_TEST_FAILURE]: thrown from subtest sync throw fail - + [Error [ERR_TEST_FAILURE]: Symbol(thrown symbol from sync throw non-error fail)] { code: 'ERR_TEST_FAILURE', failureType: 'testCodeFailure', cause: Symbol(thrown symbol from sync throw non-error fail) } @@ -200,7 +200,7 @@ Error [ERR_TEST_FAILURE]: thrown from subtest sync throw fail - + [Error [ERR_TEST_FAILURE]: this should be executed] { code: 'ERR_TEST_FAILURE', @@ -231,7 +231,7 @@ Error [ERR_TEST_FAILURE]: thrown from subtest sync throw fail - + [Error [ERR_TEST_FAILURE]: callback failure] { code: 'ERR_TEST_FAILURE', @@ -245,12 +245,12 @@ Error [ERR_TEST_FAILURE]: thrown from subtest sync throw fail - + [Error [ERR_TEST_FAILURE]: passed a callback but also returned a Promise] { code: 'ERR_TEST_FAILURE', failureType: 'callbackAndPromisePresent', cause: 'passed a callback but also returned a Promise' } - + [Error [ERR_TEST_FAILURE]: thrown from callback throw] { code: 'ERR_TEST_FAILURE', @@ -266,7 +266,7 @@ Error [ERR_TEST_FAILURE]: thrown from subtest sync throw fail } - + Error [ERR_TEST_FAILURE]: callback invoked multiple times * @@ -278,7 +278,7 @@ Error [ERR_TEST_FAILURE]: callback invoked multiple times - + Error [ERR_TEST_FAILURE]: callback invoked multiple times * { @@ -293,7 +293,7 @@ Error [ERR_TEST_FAILURE]: callback invoked multiple times } - + Error [ERR_TEST_FAILURE]: thrown from callback async throw * { @@ -311,12 +311,12 @@ Error [ERR_TEST_FAILURE]: thrown from callback async throw - + [Error [ERR_TEST_FAILURE]: customized] { code: 'ERR_TEST_FAILURE', failureType: 'testCodeFailure', cause: customized } - + [Error [ERR_TEST_FAILURE]: { foo: 1, @@ -329,7 +329,7 @@ Error [ERR_TEST_FAILURE]: thrown from callback async throw - + Error [ERR_TEST_FAILURE]: thrown from subtest sync throw fails at first * @@ -350,7 +350,7 @@ Error [ERR_TEST_FAILURE]: thrown from subtest sync throw fails at first } - + Error [ERR_TEST_FAILURE]: thrown from subtest sync throw fails at second * { @@ -369,12 +369,12 @@ Error [ERR_TEST_FAILURE]: thrown from subtest sync throw fails at second - + [Error [ERR_TEST_FAILURE]: test timed out after 5ms] { code: 'ERR_TEST_FAILURE', failureType: 'testTimeoutFailure', cause: 'test timed out after 5ms' } - + [Error [ERR_TEST_FAILURE]: test timed out after 5ms] { code: 'ERR_TEST_FAILURE', failureType: 'testTimeoutFailure', cause: 'test timed out after 5ms' } @@ -382,12 +382,12 @@ Error [ERR_TEST_FAILURE]: thrown from subtest sync throw fails at second - + [Error [ERR_TEST_FAILURE]: custom error] { code: 'ERR_TEST_FAILURE', failureType: 'testCodeFailure', cause: 'custom error' } - + Error [ERR_TEST_FAILURE]: foo * { @@ -400,7 +400,7 @@ Error [ERR_TEST_FAILURE]: foo } - + Error [ERR_TEST_FAILURE]: bar * { @@ -413,7 +413,7 @@ Error [ERR_TEST_FAILURE]: bar } - + [Error [ERR_TEST_FAILURE]: Expected values to be loosely deep-equal: @@ -498,7 +498,7 @@ should loosely deep-equal } - + Error [ERR_TEST_FAILURE]: test could not be started because its parent finished * {