-
Notifications
You must be signed in to change notification settings - Fork 271
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
An error was reported running the example #1422
Comments
Hello @dingsq820, thanks for submitting the issue! When running this test in the react-native-testing-library repo I don't get this error, could you please detail the steps to reproduce it? |
I confirm the tests are working fine for me. Closing as non-reproducible. |
I have pinned down the version that started this issue as |
Hello @kyleshevlin , where are you running the example from? This is not an issue with RNTL I think. It seems more related to the way the Switch component is mocked in React Native. It must have appeared because If we don't have this error in the RNTL repo maybe it's probably because it has been fixed and you're using older versions of RN? What version of RN are you using to reproduce the error? |
Correct, we are stuck on Since it's an older version of RN, I might not worry too much about it, I just wanted to add that detail in case it helps others. |
Have you tried solutions proposed in the other issue? This comment in the other issue gives a solution to fix that issue. It's what I used on previous rn versions |
@kyleshevlin not sure how relevant is it for your case but you mentioned that you use React Native Web, which unfortunately we do not support. We recommend using regular React Testing Library for testing React Native Web for two reasons:
|
Closing as stale. |
There are useless warnings coming from the update of @testing-library/react-native linked to the Switch component and dispatchCommand. They are removed in React Native 0.72. This is a temporary mock to keep our tests clean. callstack/react-native-testing-library#1422
There are useless warnings coming from the update of @testing-library/react-native linked to the Switch component and dispatchCommand. They are removed in React Native 0.72. This is a temporary mock to keep our tests clean. callstack/react-native-testing-library#1422
There are useless warnings coming from the update of @testing-library/react-native linked to the Switch component and dispatchCommand. They are removed in React Native 0.72. This is a temporary mock to keep our tests clean. callstack/react-native-testing-library#1422
There are useless warnings coming from the update of @testing-library/react-native linked to the Switch component and dispatchCommand. They are removed in React Native 0.72. This is a temporary mock to keep our tests clean. callstack/react-native-testing-library#1422
The run example reports the following error:
` PASS tests/questionsBoard.test.tsx
The text was updated successfully, but these errors were encountered: