-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Expand --json output when using --verbose #1900
Comments
Sidenote: I'm very willing to make this myself, I maintain the biggest test runner in Objective-C, so I should try to understand the internals of our JS stuff more. I'm much more interested in whether this is something that'd be merged or not Other note: I feel like I'd also want the line of the raised exception if there was a failure. So, maybe "status": { "state": "passed" }
...
"status": { "state": "failed", "message":"Expected 'x' got 'y'", "line": 345 }
...
"status": { "state": "skipped" } |
@orta I'm totally happy to support this if you send a PR. If the data is big and takes a lot of time to calculate, I'd prefer it to only happen with the verbose flag. Otherwise, if it's quick to compute and not that much more info than we already have, feel free to expand the existing |
I'm going to close this issue because by itself it isn't actionable and it isn't on our internal roadmap. Please feel free to keep sending PRs and extend the |
Perfect, I was going to do that when that PR merged 👍 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Do you want to request a feature or report a bug?
Feature.
I'm building out tooling for VS Code, to highlight tests inline and ideally would like to be able to do this based on the output of
--json
.Currently the test JSON gives a lot of information about the suites, but I'd like to get a bit more fine-grained information. For example, I would like to know:
This is the sort of stuff normally used in junit-esk reporters, with line of code being an extra
What is the current behavior?
node_modules/.bin/jest --debug --json --verbose
What is the expected behavior?
The above is what you would see without
--verbose
and with--verbose
it would be:node_modules/.bin/jest --debug --json --verbose
I don't know for certain whether the rest results are directly matched to a specific file, if it is, then
"file"
could be removed from the test cases and only line would be needed.WRT error messages, the current message is for the whole suite, and so it would be hard to pull out specific metrics for an individual test, so Iv'e adde dit into the JSON example.
Does this feel reasonable? ( Or is there some JS-y standard I don't know of that I can make this conform to? I'm pretty new to the ecosystem. )
The text was updated successfully, but these errors were encountered: