Khan / react-components

khan.github.io/react-components/
MIT License
1.01k stars 99 forks source link

Does not work with jest #32

Closed kentor closed 9 years ago

kentor commented 9 years ago

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?