-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Fix "container is falsey" error when using code coverage #156
Changes from 7 commits
b326cdd
063040e
dc9748a
a54dc05
08e925e
7ad53cd
f0ff8a4
68ac71e
d1df8e7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -165,6 +165,8 @@ module.exports = function (babel) { | |
]) | ||
); | ||
} else { | ||
path.scope.crawl(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I worry that doing this for every import declaration replacement is going to be quite costly. Now that you fully understand what is wrong, I wonder if we can avoid the re-crawl by detecting the specific failure scenario and handling it. 🤔 Thoughts @mdeanjones? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Makes sense. I opted for a "try, and try again" approach. It gets the job done, but does feel a bit... hacky. |
||
|
||
// Replace the occurences of the imported name with the global name. | ||
let binding = path.scope.getBinding(local.name); | ||
|
||
|
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.
Nice one, thank you!