-
Notifications
You must be signed in to change notification settings - Fork 23
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
Support return array #22
base: main
Are you sure you want to change the base?
Support return array #22
Conversation
Signed-off-by: Charlike Mike Reagent <[email protected]>
Signed-off-by: Charlike Mike Reagent <[email protected]>
Signed-off-by: Charlike Mike Reagent <[email protected]>
Signed-off-by: Charlike Mike Reagent <[email protected]>
Signed-off-by: Charlike Mike Reagent <[email protected]>
202b6e0
to
0b5479a
Compare
Signed-off-by: Charlike Mike Reagent <[email protected]>
Signed-off-by: Charlike Mike Reagent <[email protected]>
Signed-off-by: Charlike Mike Reagent <[email protected]>
Signed-off-by: Charlike Mike Reagent <[email protected]>
Someone on that? @SimenB? |
Signed-off-by: Charlike Mike Reagent <[email protected]>
Any chance getting this merged. Got a fork with these changes only would be good if they were in the repo. |
if (Array.isArray(testResult)) { | ||
testResult.forEach(result => | ||
result.numFailingTests > 0 | ||
? onFailure(test, new Error(result.errorMessage)) |
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.
is this correct? I thought onResult
was called with all test results regardless of whether the result is a failure or not, and onFailure
was called if the test framework errored out. That might be wrong though, I haven't looked into the source code of this module for some time 😅
Could you show an example of how this is used in a runner and how it looks when used in Jest?
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.
You are correct, onFailure is when the framework errors out. It is passed a SerializableError
I am working on this jest-python. It would be good to see if it was at all possible to simplify its implementation with this library.
.then(testResult => { | ||
if (Array.isArray(testResult)) { | ||
testResult.forEach(result => | ||
result.numFailingTests > 0 |
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.
Can you do an if
rather than the ternary?
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.
ok, soon maybe cuz I'm not active in the past year.
@tunnckoCore ping 🙂 |
Uh yea, hey there, long time... I can't get on that soon. Not that active. I published a fork on my |
resolves #20 and #21