Skip to content

Picker error in the test files #624

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gokceer opened this issue Jun 22, 2022 · 2 comments
Closed

Picker error in the test files #624

gokceer opened this issue Jun 22, 2022 · 2 comments

Comments

@gokceer
Copy link

gokceer commented Jun 22, 2022

I have DateTimePicker in my component. After upgrading to 6.1.3, I start to get this error in my test files:

`The above error occurred in the component:

at Picker (/@react-native-community/datetimepicker/src/datetimepicker.ios.js:61:19)
at View
at View (/node_modules/react-native/jest/mockComponent.js:28:227)
at RCTScrollView
at RCTScrollView (/node_modules/react-native/jest/mockNativeComponent.js:15:237)
at ScrollView (/node_modules/react-native/jest/mockScrollView.js:22:239)
at AnimatedComponent (/node_modules/react-native/Libraries/Animated/createAnimatedComponent.js:52:227)
at AnimatedComponentWrapper
at View
at View (/node_modules/react-native/jest/mockComponent.js:28:227)
at NativeDatepicker (/components/form/datepicker/lib/index.js:26:76)
at View
at View (/node_modules/react-native/jest/mockComponent.js:28:227)
at Datepicker (/components/form/datepicker/index.js:2683:35)

Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.`

I guess I need to add a mock function, I tried all of the mock functions in here:
#216
but those doesn't work for me.

Have you encountered this kind of situation?

@vonovak
Copy link
Member

vonovak commented Jun 27, 2022

Hello and thanks for reporting,

The above error occurred in the component:

you forgot to add the error that was reported by jest

Thank you 🙂

@github-actions
Copy link

github-actions bot commented Jul 7, 2022

👋 @gokceer, sorry you're having an issue. This issue is being closed because it does not provide all information required by the issue template. As the issue template explains, we require that you provide a runnable example that reproduces your issue and your environment information. This means you need to provide a code snippet that we can copy-paste into an empty project and see the error ourselves, or provide a git repository with the issue.
The reason is that maintainers do not have time to try reproduce bugs themselves. Please try to minimize the superfluous code and focus only on reproducing the bug.
Please create a new issue with this and we'll be happy to review it!

@github-actions github-actions bot closed this as completed Jul 7, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jul 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants