Open vijaemanlapaz opened 2 years ago
how to resolve this ? any one able to find the solution ?
see this issue: https://github.com/cooperka/react-native-snackbar/issues/43. its on regular usage but you might find something
Also ensure your pods are installed (RNSnackbar (2.4.0))
.
I am getting a similar message - "Cannot read properties of undefined (reading 'LENGTH_LONG')" Functionality is all good, this issue is specific to when running tests We are on React Native "0.67.2", using "2.4.0" of react-native-snackbar Already went through issue #43 and tried everything.
I am getting a similar message - "Cannot read properties of undefined (reading 'LENGTH_LONG')" Functionality is all good, this issue is specific to when running tests We are on React Native "0.67.2", using "2.4.0" of react-native-snackbar Already went through issue #43 and tried everything.
Same issue here, works fine when using the app, however once I run Jest it will fail. Already added the package to Jest transformIgnorePatterns
, without result
I was getting this issue, uninstalling app, closing metro server and running app again worked for me.
Any working solution or fixes on this issue?
If anyone is struggling with this, you can create a mock in your jest.setup.js
:
jest.mock('react-native-clipboard', () => ({
LENGTH_SHORT: 5,
LENGTH_LONG: 10,
LENGTH_INDEFINITIE: -1,
show: jest.fn(),
dismiss: jest.fn(),
})
I've addressed this in a PR, here: https://github.com/cooperka/react-native-snackbar/pull/210
I'm getting error _Cannot read property 'LENGTHLONG' of undefined when i do
yarn test
i'm using version 2.4.0Environment react-native: 0.65.2 => 0.65.2
Steps i did so far