react-native-testing-library
                                
                                 react-native-testing-library copied to clipboard
                                
                                    react-native-testing-library copied to clipboard
                            
                            
                            
                        Using something from testing library causes warning: Jest did not exit one second after the test run has completed.
Describe the bug
When I import and using something from @testing-library/react-native the following warning appears:
Jest did not exit one second after the test run has completed.
Expected behavior
This warning does not appear
Steps to Reproduce
Just import render and use it in a test:
import React from 'react';
import { Text } from 'react-native';
import { render } from '@testing-library/react-native';
it('testing library working', () => {
  const { getByText } = render(<Text>123</Text>);
  const text = getByText(/123/);
  expect(text).toBeTruthy();
});
Screenshots
 

Versions
npmPackages:
    @testing-library/react-native: ^9.1.0 => 9.1.0 
    react: ^17.0.2 => 17.0.2 
    react-native: ^0.67.3 => 0.67.4 
    react-test-renderer: ^17.0.2 => 17.0.2
@paskalov-aris I'm experiencing this exact problem, but with @testing-library/react-hooks. Did you solve this?
I'm also experiencing the same issue. Would love to know what you did to solve this @paskalov-aris (assuming it was solved that is)
I am using Expo and I got the same error. I solved it by using Jest version compatible to Expo (in my case 26.x). The error occurred when I was using Jest 28.x
I was about to say - downgrading Jest to 27.5.1 seems to have fixed it for me.
I still feel like this issue should be reopened though, feels like there's something in the way @testing-library/react-native methods operate that cause this to be an issue in jest v28+.
I am using Expo and I got the same error. I solved it by using Jest version compatible to Expo (in my case 26.x). The error occurred when I was using Jest 28.x
Can confirm that downgrading to the version that expo supports fixed the issue for me. Command I used fyr
expo install jest -- -D
This seems to be the same error as #1054.
@dennis-gonzales @jamesL92 @dapicester @sondreluc @paskalov-aris please check if [this fix]((https://github.com/callstack/react-native-testing-library/issues/1054#issuecomment-1221099057) works for you.
@mdjastrzebski Can confirm that it fixes this issue for me 👍