You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When importing CookieManager into tests we get the following error:
import { NativeModules, Platform } from 'react-native';
^^^^^^
SyntaxError: Cannot use import statement outside a module
1 | import { ApolloClient, ApolloProvider } from '@apollo/client'
> 2 | import CookieManager from '@react-native-cookies/cookies'
For others who have this issue, we worked around it in our tests by mocking the entire library like this:
// __mocks__/@react-native-cookies/cookies.ts
const CookieManager = {
clearAll: jest.fn(),
// Any other methods you need
}
export default CookieManager
The text was updated successfully, but these errors were encountered:
When importing CookieManager into tests we get the following error:
For others who have this issue, we worked around it in our tests by mocking the entire library like this:
The text was updated successfully, but these errors were encountered: