-
-
Notifications
You must be signed in to change notification settings - Fork 217
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
Show stacktrace on test error in repl #1903
Show stacktrace on test error in repl #1903
Conversation
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.
Thanks for doing this! ❤️ The changes look good. I've tested that it works.
ESLint seems unhappy with something. Are you running the main build task when you hack on Calva? It should have a pane where the ESLint results are showing. Let me know if you need any help with this.
@PEZ I've fixed that now. I will go through the remaining checklist items. |
I think it looks fine. Docs is not strictly necessary here. If you find the time for that you can add it as a separate update. Merging! |
@PEZ thanks for merging this in and releasing it. Currently if more than one test fails the user will only be able to print the stacktrace for the last error that occurs. Is there a way of displaying a button for each test error or is that overkill? |
It's not overkill. It is also not currently prepared for that. But shouldn't be too hard to achieve, I think. Maybe we will need to keep track of the trace objects we have created and free them when a new test run is issued. And maybe not. @bpringe usually can help with that kind of decision. |
Also. It would be great if we tested the feature added by this PR in an integration test. Maybe that's a way to give ourselves the courage to go for the multiple stack-trace buttons. |
That sounds like a good idea to me, if we're going to be savings traces in memory. |
What has changed?
Details
A PR had already been raised for this a few years ago. Given there are git conflicts I thought it was easier to simply create a new PR.
One issue with my current implementation is that if there are multiple errors only the last error will display the 'Print stacktrace' button. Is there a way of having multiple buttons after each test error?
Fixes #424
My Calva PR Checklist
If this PR involves only documentation changes, I have:
published
branch.If this PR involves code changes, I have:
dev
branch. (Or have specific reasons to target some other branch.)published
. (Sorry for the nagging.)[Unreleased]
entry inCHANGELOG.md
, linking the issue(s) that the PR is addressing.ci/circleci: build
test.npm run prettier-format
)npm run eslint
before creating your PR, or runnpm run eslint-watch
to eslint as you go).Ping @PEZ, @bpringe, @corasaurus-hex, @Cyrik