-
Notifications
You must be signed in to change notification settings - Fork 115
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
Expo Web Broken after integrating Cavy #188
Comments
Hey there @YahyaBagia ! Sorry it's taken me a while to respond - are you still having issues? I don't really have any experience with Expo web, so I might not be the best person to help! But it sounds like you need to get webpack to transpile your node_modules, using something like @expo/webpack-config : https://github.com/expo/expo-cli/tree/master/packages/webpack-config#include-modules. Let me know how you get on! |
Thank you @AbigailMcP for replying. For the time being I've excluded cavy from my Expo project. Please consider making cavy work out of the box with Expo web (if possible). Thank you for the great E2E testing library. |
@AbigailMcP I managed to get this working (for expo for web) after adding cavy to the list of modules that you mentioned in the custom webpack config. Transpiling as above handles the JSX in the Tester file (which was causing the above error). However, the index.js is using module.exports and I believe this is what might be causing the error. I was able to get it working in my project by changing the index.js file and just exporting the object rather than using I'm trying to see how I could automate this by modifying the webpack or babel config... if anyone has any thoughts, it would be appreciated. I'm not very familiar with this. |
@mwarger, can you share a demo project where you successfully implemented Cavy in an Expo project that works for Web as well? It would be a great help for anyone who is looking for this. |
Yes, i will get an example put up. Also, the simpler way to do this might just be to change the index.js export and see if that doesn't happen to break anything. If that's the case then this library should work for web just by adding a transpilation step. I'm also wanting to look and see how other libraries that are web compatible allow for both to co-exist by building the appropriate output. React-Native-Paper comes to mind... I'm going to pull the cavy-tester example and play with it. |
Hi @mwarger - thanks so much for sharing your success! 🎉 Did you manage to make any headway with a working demo in the Cavy Tester? I'd really love to get this documented / your demo included somewhere in the codebase as an example :) Thanks! |
I haven't yet - I had other priorities. Thanks for the ping though, I'll look at doing this again soon. |
@YahyaBagia I use it in my project:
|
Just implemented Cavy into my expo project that runs on Android, iOS and Web (managed workflow). Test cases are working properly on Android and iOS but the app now fails to run on Web (non testing mode). It shows the following error :
A couple of google search suggests creating / modifying
webpack.config.js
or.babelrc
. My project doesn't have any of them. It's fine that cavy doesn't yet support testing on Web. I just want my app to be running on Web as usual.The text was updated successfully, but these errors were encountered: