Skip to content

Jest Warnings: You are trying to import a file after the Jest environment has been torn down. #658

@IPWright83

Description

@IPWright83

Describe the bug

Getting lots of warnings when running tests with Jest:

ReferenceError: You are trying to import a file after the Jest environment has been torn down.

 at reportLogBoxError (node_modules/react-native/Libraries/LogBox/Data/LogBoxData.js:95:27)
 at Immediate._onImmediate (node_modules/react-native/Libraries/LogBox/Data/LogBoxData.js:201:7)

/home/iw***/src/mobileApp/myuoy/node_modules/react-native/Libraries/LogBox/Data/LogBoxData.js:104
ExceptionsManager.handleException(error, true);

I believe that this is likely this library due to testing-library/native-testing-library#132 but I may be wrong

Expected behavior

No warnings

Steps to Reproduce

I'm not exactly sure, as I don't know where this is being triggered from. The stack trace is originating within LogBoxData.

Versions

npmPackages:
    @testing-library/react-native: ^7.1.0 => 7.1.0 
    react: 16.13.1 => 16.13.1 
    react-native: 0.63.2 => 0.63.2 
    react-test-renderer: 16.13.1 => 16.13.1 

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