iamolegga / react-native-launch-arguments

Get launch arguments for testing with Detox and Appium
MIT License
55 stars 21 forks source link

Launch args persist between launches #76

Open christinachimi opened 2 months ago

christinachimi commented 2 months ago

Not sure if this is a bug. I started using launch arguments in my Maestro tests, and I'm finding that they persist such that after I kill the app and start it up again (using expo start --clear) the arg from the test is still present. I'd rather not have to set default values for them everywhere that the app might be launched. Is this expected behavior? Is there a way to clear the args? My initial thought is an onCompleteFlow step that just relaunches the app with default values but curious if there's a better way. I am developing for iOS, launching on Simulator. (As expected, using expo run:ios does clear the launch arguments).

iamolegga commented 2 months ago

This library has not it's own state, so must be something with your tests env. It just parse launch args as is and that's it