Skip to content
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

Fix open handles in tests and update testing tools #1028

Merged
merged 7 commits into from
Dec 5, 2023

Commits on Dec 5, 2023

  1. Configuration menu
    Copy the full SHA
    08bc481 View commit details
    Browse the repository at this point in the history
  2. test: Fix error in useCookieResyncOnResume test

    Following @testing-library/react-native package update, I got a
    "Trying to detect host component names triggered the following error"
    error in useCookieResyncOnResume test.
    
    I updated how we mock react-native with the recommended guidelines.
    
    See
    https://callstack.github.io/react-native-testing-library/docs/troubleshooting#mocking-react-native
    zatteo committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    f103b48 View commit details
    Browse the repository at this point in the history
  3. test: Update jest and ts-jest

    zatteo committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    156aecc View commit details
    Browse the repository at this point in the history
  4. test: Fix open handles to improve test lisibility

    We have a lot of open handles flooding the end of our test results. It seems that they are due to a React issue fixed in 18+.
    
    Dan Abramov wrote a small package to fix the issue temporarly. I added it here manually because it has an error in the semver version check. This code should be removed when upgrading React to 18+.
    
    facebook/react#20756 (comment)
    zatteo committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    06265a1 View commit details
    Browse the repository at this point in the history
  5. test: Remove dispatchCommand useless warning in tests

    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
    zatteo committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    4df1323 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    230f240 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ceaeab2 View commit details
    Browse the repository at this point in the history