Uh oh!
There was an error while loading. Please reload this page.
test_runner: handled change for exposing 'spec' reporter - #48202
Conversation
Other reporters (dot, tap) by signature are a function while 'spec' reporter is a ES6 class. This behaviour of api spec is causing difference in semantics while consumption since it has not been addressed anywhere in the document (it has to be instantiated). Instead of making changes in the signature of spec.js, i have proposed changes where the 'spec' reporter gets exposed in reporter.js Fixes: nodejs#48112 Refs: https://github.com/nodejs/node/blob/main/lib/internal/test_runner/reporter/spec.js Refs: (@line-no:143) https://github.com/nodejs/node/blob/main/lib/internal/test_runner/utils.js
nodejs-github-bot
commented
May 27, 2023
Review requested:
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Sumi0
commented
Jun 1, 2023
I do not understand why is the test failing @line-no:79 test-runner-run.mjs. |
MoLow
commented
Jun 1, 2023
you should debug locally with |
Sumi0
commented
Jun 1, 2023
|
| value: spec ?? function SpecReporter() { | ||
| return ReflectConstruct(require('internal/test_runner/reporter/spec'), arguments); |
There was a problem hiding this comment.
| value: spec??functionSpecReporter(){ | |
| returnReflectConstruct(require('internal/test_runner/reporter/spec'),arguments); | |
| value: functionSpecReporter(){ | |
| spec??=require('internal/test_runner/reporter/spec'); | |
| returnReflectConstruct(spec,arguments,new.target); |
(not sure about the new.target)
There was a problem hiding this comment.
Let me run full test this time on my local and check.
There was a problem hiding this comment.
@atlowChemi I have tried all versions of returning instance of a class (imported with require), either with new keyword or with Reflect.construct, and both are not working.
I am not able to identify the Root cause.
cjihrig
commented
Aug 15, 2023
@Sumi0 are you still planning to work on this, or should it be closed? |
This issue/PR was marked as stalled, it will be automatically closed in 30 days. If it should remain open, please leave a comment explaining why it should remain open. |
benjamingr
commented
May 11, 2024
This was already superseded by #49184 |
Fixes: Issue#48112
Other reporters (dot, tap) by signature are a function while 'spec'
reporter is a ES6 class.
This behaviour of api spec is causing difference in semantics while
consumption since it has not been addressed anywhere in the document
(it has to be instantiated).
Instead of making changes in the signature of spec.js, i have proposed
changes where the 'spec' reporter gets exposed in reporter.js
Refs: reporter/spec.js
Refs: (@line-no:143) test_runner/utils.js