Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions test/parallel/test-assert-fail.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,5 @@
Object.prototype.get = () => { throw new Error('failed'); };
assert.throws(() => assert.fail(''), { code: 'ERR_ASSERTION' });
delete Object.prototype.get;
throw new Error('fail');

Check failure on line 50 in test/parallel/test-assert-fail.js

View workflow job for this annotation

GitHub Actions / test-macOS

--- stdout --- Test failure: 'Object prototype get' Location: test/parallel/test-assert-fail.js:46:1 Error: fail at TestContext.<anonymous> (/Users/runner/work/node/node/node/test/parallel/test-assert-fail.js:50:9) at Test.runInAsyncScope (node:async_hooks:211:14) at Test.run (node:internal/test_runner/test:989:25) at Test.processPendingSubtests (node:internal/test_runner/test:680:18) at Test.postRun (node:internal/test_runner/test:1105:19) at Test.run (node:internal/test_runner/test:1033:12) at async Test.processPendingSubtests (node:internal/test_runner/test:680:7) Command: out/Release/node --test-reporter=./test/common/test-error-reporter.js --test-reporter-destination=stdout /Users/runner/work/node/node/node/test/parallel/test-assert-fail.js
});
11 changes: 8 additions & 3 deletions tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,7 @@ def HasRun(self, output):

class ActionsAnnotationProgressIndicator(DotsProgressIndicator):
def AboutToRun(self, case):
case.additional_flags = case.additional_flags.copy() if hasattr(case, 'additional_flags') else []
case.additional_flags.append('--test-reporter=./test/common/test-error-reporter.js')
case.additional_flags.append('--test-reporter-destination=stdout')
pass

def GetAnnotationInfo(self, test, output):
traceback = output.stdout + output.stderr
Expand Down Expand Up @@ -1448,6 +1446,9 @@ def BuildOptions():
result.add_option("--type",
help="Type of build (simple, fips, coverage)",
default=None)
result.add_option("--error-reporter",
help="use error reporter",
default=True, action="store_true")
return result


Expand Down Expand Up @@ -1663,6 +1664,10 @@ def Main():
options.node_args.append("--always-turbofan")
options.progress = "deopts"

if options.error_reporter:
options.node_args.append('--test-reporter=./test/common/test-error-reporter.js')
options.node_args.append('--test-reporter-destination=stdout')

if options.worker:
run_worker = join(workspace, "tools", "run-worker.js")
options.node_args.append(run_worker)
Expand Down
Loading