Does not work with jest
Closed this issue · 0 comments
I use jest to test, and I use the babel-jest
script preprocessor to transform my tests which are written in ES6 and JSX.
However, I think the jest preprocessor only transforms my source code, not code inside node_modules. Indeed it would probably be really slow if it also transformed third party code in node_modules.
This is a problem when I'm testing a file that imports one of these react-component modules because the JSX in those modules won't get transformed.
Currently I'm just copying and pasting the components from this project into my project instead of using npm, which is a less than ideal workaround.
Perhaps a better solution is for this project to build the components into valid ES5 in a dist
folder and the end users can import those?