-
-
Notifications
You must be signed in to change notification settings - Fork 305
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
Option to limit the number of lines of a stack trace shown #397
Comments
I'd think this would need to be an option in I'd expect it to support a positive or negative nonzero integer; Other alternatives include a regex that can be used to filter the trace line; any suggestions are welcome. |
Hi @ljharb, this is an old issue but I recently started using this package. I'm filtering the tap output in a subsequent script. The script is in this PR for another project: https://github.com/covidatlas/li/pull/73/files Here's the filtered output of a failure:
Rather than modify this project, and ask ppl to change their tests, perhaps you could offer something like this as a script, and ppl could use it like
Note the script also tweaks the tap output (adding "(fail at:" etc.) so that it's better in summaries, but that's not relevant for this. Cheers! jz |
@jzohrab that seems like a great idea for a separate package :-) |
@ljharb - published separately on npm, or as part of this project? This proj is great, perhaps it could be included in a subdir here. I'm not a real JS dev and so am not sure what's involved in making/publishing a new package, and it seems like a common enough use case that it could just go here. Thoughts? |
Yes, lots of small separate packages is generally preferable to one large one. I'm not sure how common it is given that this is the only issue, and you and the OP are the only one who've expressed interest. |
Showing the full stack trace of an error is a new feature of
tape
introduced with versions >4.6.3
, see #330 (comment).While often being helpful, there are test setups where this information is useless (example below) and very much bloats the test output, making debugging a lot harder.
An option to limit the number of lines of a stack trace shown would help a lot in these context, see also discussion here: #330 (comment)
The text was updated successfully, but these errors were encountered: