Skip to content
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: run babel-plugin-jest-hoist as exit visitor #7634

Closed
wants to merge 3 commits into from

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Jan 15, 2019

Summary

Fixes #7633

Test plan

Integration test added

@SimenB
Copy link
Member Author

SimenB commented Jan 15, 2019

Hmm, this broke the injected babel helpers 😢

@jeysal
Copy link
Contributor

jeysal commented Jan 15, 2019

Whitelisting the helpers would probably suck because it would need frequent updating.
Best I can come up with would be to also do a pass to collect identifiers on enter, and then on exit do a pass, but only throw for identifiers included in the set generated on enter.

@SimenB
Copy link
Member Author

SimenB commented Jan 15, 2019

That's a good idea, it should work! Will test tomorrow

@jeysal
Copy link
Contributor

jeysal commented Jan 15, 2019

Great, let me know if you encounter any issues with that approach :)

@SimenB
Copy link
Member Author

SimenB commented Jan 15, 2019

If you have time now, it'd be awesome if you could test it :)

@jeysal
Copy link
Contributor

jeysal commented Jan 15, 2019

Not today I'm afraid, but if you want to focus on other stuff and want me to take over and get this running properly I'd be happy to help. Done quite some stuff with Babel in the past.

@SimenB
Copy link
Member Author

SimenB commented Jan 15, 2019

Took a closer look at the logic now, and if you have some understanding of babel plugin, I'd love for you to take over this one! 😀

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mock factories do not support explicit TypeScript typing using imported types
3 participants