Open Smtih opened 6 years ago
Does #8 sort it out for you?
@dariocravero https://github.com/viewstools/yarn-workspaces-cra-crna/pull/8 doesn't make it work
I made a PR to fix web & native tests: https://github.com/viewstools/yarn-workspaces-cra-crna/pull/15 The main "tricks" was to move the native/.babelrc to the root folder (need documentation for that) + update the jest version on native side
So I've been using this as the basis for a project using cra and crna.
Using the workspace_example provided running yarn test on the native project doesn't work (pretty obvious as it sitl points to ./node_modules/jest/.bin/jest.js which is now in the parent directory.
pointing to the jest file in the parent directory doesn't fix the issue as jest-expo preset is still using the native directory as it's root to find other modules.
Next level of fixing is to change the rootDir in jest. in the end I had to add the following lines to the package.json jest config.
the roots are needed such that it doesn't try and run tests in all folders from the workspace but can still find node modules, however it then can't interpret es6 things anymore. This is where I'm stuck.