-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_runner: fix todo and skip messages on spec-reporter #47525
test_runner: fix todo and skip messages on spec-reporter #47525
Conversation
Review requested:
|
b475dd8
to
cecf5df
Compare
@MoLow @cjihrig hey there! Do you know why my changes are not being affected when running it with the --test flag? Without it, the result is: ./node erick-test/index.test.js
▶ my test
□ my todo (0.186458ms)
﹣ my skip (0.069583ms) # SKIP
✔ hello world (0.042875ms)
▶ my test (1.454833ms)
ℹ tests 3
ℹ suites 1
ℹ pass 1
ℹ fail 0
ℹ cancelled 0
ℹ skipped 1
ℹ todo 1
ℹ duration_ms 7.476542 with it is: ./node --test erick-test/index.test.js
▶ my test
▶ my todo
▶ my skip
✔ hello world (0.03225ms)
✔ my test (1.0185ms)
ℹ tests 1
ℹ suites 1
ℹ pass 1
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 65.784083 |
My guess is this is a bug in the TAP parser. |
I think, we have to add cases for Also, tests are failing locally. |
@@ -3,6 +3,7 @@ const { | |||
ArrayPrototypePush, | |||
ArrayPrototypeShift, | |||
} = primordials; | |||
const console = require('console') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove this.
case 'test:pass': | ||
return this.#handleTestReportEvent(type, data); | ||
case 'test:skip': | ||
return this.#handleTestReportEvent(type, data); | ||
case 'test:todo': | ||
return this.#handleTestReportEvent(type, data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
case 'test:pass': | |
return this.#handleTestReportEvent(type, data); | |
case 'test:skip': | |
return this.#handleTestReportEvent(type, data); | |
case 'test:todo': | |
return this.#handleTestReportEvent(type, data); | |
case 'test:pass': | |
case 'test:skip': | |
case 'test:todo': | |
return this.#handleTestReportEvent(type, data); |
skip(nesting, file, testNumber, name, details, directive) { | ||
this.#emit('test:skip', { __proto__: null, name, nesting, file, testNumber, details, ...directive }); | ||
} | ||
|
||
todo(nesting, file, testNumber, name, details, directive) { | ||
this.#emit('test:todo', { __proto__: null, name, nesting, file, testNumber, details, ...directive }); | ||
} | ||
|
||
ok(nesting, file, testNumber, name, details, directive) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please fix indentation
Also, here what I found while debugging this, if your try to pass args to |
this is a draft my friend! Not supposed to be reviewed yet |
also do we really need new |
@ErickWendel this should now work (after rebasing) the same with and without |
gonna check it out! |
No description provided.