-
Notifications
You must be signed in to change notification settings - Fork 4
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
Transforming assignment expressions is unstable when collecting coverage (default reporter failing) #2
Comments
You can enable debugging to get a readout on what this plugin is transforming and how with And maybe I can help by giving a rundown on how this plugin transforms ASTs:
Once I put the final touches on another project I'm working on, I'll flesh out the documentation for this plugin with this and other important info 😅 |
@daetal-us And here's an example of the plugin's debug output when it's functioning properly using the default reporter (and Expand
|
Super helpful. It does not appear to be due to assignment expression. I've narrowed down on case to an import from another file - its just an exported string const. For some reason the traversal context is different when the coverage param is enabled - the parent node is different and the e.g.
And inspecting the node trying to apply the replaceWith operation I'm seeing: |
For posterity, the pastes above where output of the input Node's |
@daetal-us Thank you for taking the time to analyze this in depth! Very interesting about attempting to add the failing test. The problem might be that the way I'm transforming the assignment expression is naive (I wish Babel had better documentation, hah). It might also be that In the meantime, if it's only when calling |
(I'll keep this open for now) |
Hey! I worked around this issue using
btw I published an article that might be of an interest to you where I mention this library: |
Added the plugin to my Babel config. Works great running tests. However running with coverage (with default reporter) everything kind of blows up. Lots of reports of “Container” being falsy attributed to this plugin. Still trying to identify root cause.
The text was updated successfully, but these errors were encountered: