Closed GeoffreyPlitt closed 7 years ago
This is a strange bug, however generally i'd be against actually calling an API in your tests using fetch. The response should be stubbed so it can be reliably asserted against.
Closing as a mix of non-issue, and possibly outside our codebase.
Actually, I just solved it. To anyone else curious: just use this: https://www.npmjs.com/package/fetch-cookie
In production, fetch() saves cookies as you would expect against an API that does cookie-based session login authentication.
But our tests with the same code (and react-native-mock) show fetch() not sending cookies on subsequent calls after login(), so I believe it's correct to say react-native-mock's fetch() has a bug with cookies.