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 4 weeks ago

christinachimi commented 4 weeks 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 3 weeks 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