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(vue3-jest): interop custom transformer require #391

Conversation

blake-newman
Copy link
Member

interop custom transformer require. Some transformers may not interop correctly when requiring, return transformer.default or transformer.

@vue/vue2-jest fix: #390
fixes #383

interop custom transformer require. Some transformers may not interop correctly
when requiring, return `transformer.default` or `transformer`.

fixes vuejs#383
Copy link
Member

@cexbrayat cexbrayat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! It would be great to add a test for this. Do you have an example of such a transformer? If so you can add a test in the e2e test directory, it's fairly straightforward. That way we're making sure we fix the proper thing and we will not have regressions in the future.

@blake-newman
Copy link
Member Author

Sure. I'll add a test this morning.

This happens with babel-jest. The use case here is when loading babel-jest for TS transformation. This is done when Babel is used for transformation.

@nogic1008 nogic1008 added upstream Due to other packages (like Jest) vue3-jest Vue 3 labels Oct 17, 2021
Copy link
Collaborator

@nogic1008 nogic1008 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lmiller1990 lmiller1990 merged commit 5741877 into vuejs:master Nov 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream Due to other packages (like Jest) vue3-jest Vue 3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v.27.0.0-alpha.2 - TypeError: Jest: a transform must export a process function.
4 participants