Skip to content

Using something from testing library causes warning: Jest did not exit one second after the test run has completed. #982

Closed
@paskalov-aris

Description

@paskalov-aris

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

Screenshot 2022-05-23 at 10 40 41
Screenshot 2022-05-23 at 09 35 03

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions