Skip to content
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

Junit log errors #85

Closed
MRolandd opened this issue Feb 7, 2019 · 4 comments
Closed

Junit log errors #85

MRolandd opened this issue Feb 7, 2019 · 4 comments

Comments

@MRolandd
Copy link

MRolandd commented Feb 7, 2019

How to display syntax errors in Junit log? Or exactly how does the <error> tag appear? If I fail a test it is a <failure>.
In PHP unit the <error> tag appears when There is a syntax error

@MRolandd MRolandd changed the title Junit errors Junit log errors Feb 7, 2019
@palmerj3
Copy link
Collaborator

palmerj3 commented Feb 7, 2019

@MRolandd currently jest does not differentiate between an "error" and a "failure" so currently that portion is unused.

It's a feature I've wanted to add to jest for a while and eventually will do - it's a bit complex of a change in jest to make that happen.

@MRolandd MRolandd mentioned this issue Feb 7, 2019
@MRolandd
Copy link
Author

MRolandd commented Feb 7, 2019

Ok, then it is a way to parse syntax errors from the code as failures? If I have a syntax error my log file is empty. Just with an empty testsuites

@palmerj3
Copy link
Collaborator

palmerj3 commented Feb 7, 2019

Well syntax errors and other non-recoverable errors like this result in jest not even successfully parsing the test file. So, in this case, a reporter (any reporter) wouldn't get enough useful information to be able to generate a report.

jest-junit, in particular, would need to know the describe and/or it block names otherwise we'd be reporting on failures/errors on some generated id and you might not be able to make a connection to the actual test file.

@MRolandd
Copy link
Author

MRolandd commented Feb 8, 2019

Thank you for your reply. It really helped about this issue.

@MRolandd MRolandd closed this as completed Feb 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants