-
Notifications
You must be signed in to change notification settings - Fork 785
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
bug: invalid error callstacks and coverage reports in tests for components. #3147
Comments
I'm having the same issue. |
The issue appeared in the version 2.10.0. And is still present in 2.11.0 Jest cache is preventing to clearly discover the problem. So please remove the "jest" folder from your %tmp% directory when testing the versions. |
OS used: Windows 10 x64 |
just discussed this in stencil slack (here) - turns out the issue was unknowingly introduced within here as it effects this line < the new encoding should not run on an inlined sourcemap .. |
Thank you @johnjenkins. In the slack I just said my hypothesis that I got from comparing the code in branches. I had no time to properly test and verify it. Can you create a pull request for this issue? |
👀 |
Thanks @paladin80 for the super detailed reproduction case and @johnjenkins for debugging this! Both were super helpful and used directly in #3163, which should fix this issue. |
Hi @rwaskiewicz. Thank you for the quick response. |
@paladin80 Hmm it looks like '+', '/', and '=' are all reserved characters in RFC-3986 that can also be part of a valid Base 64 encoding. Let me rework this real quick... |
I didn't dig into it yet, but I think that we shouldn't encode the part EDIT: On the other side, the current url is RFC-2397 compliant, so maybe there's no need to do additional encoding. |
I spent some additional time on my PR, added tests, then tested everything manually and think everything is working in the PR as expected. #3163 has been merged, and will be in the next Stencil release (v2.12.0) |
This fix has been included in the v2.12.0 release. I'm going to close this issue, however if the problem reappears, please feel free to open a new issue! |
Prerequisites
Stencil Version
2.10.0 - 2.11.0
Current Behavior
When running tests in stencil, any error callstacks and coverage report don't match the source code.
Expected Behavior
Error callstacks should point exactly to the line of TS code, where the error happened. Jest coverage report files should properly highlight source files.
Expected behavior was fullfilled in older stencil versions.
Steps to Reproduce
For call stacks:
at Object.format (src/utils/utils.ts:308:7)
at Object. (src/utils/utils.spec.ts:15:20)
For coverage:
if (1 == 2) {
first = middle;
}
Code Reproduction URL
https://github.com/paladin80/stencil-component-starter
Additional Information
I think that generated source maps don't work in tests.
The text was updated successfully, but these errors were encountered: