Skip to content
This repository was archived by the owner on Jul 30, 2020. It is now read-only.

Test failures related to LogBox #132

Closed
drews256 opened this issue Jul 9, 2020 · 3 comments
Closed

Test failures related to LogBox #132

drews256 opened this issue Jul 9, 2020 · 3 comments

Comments

@drews256
Copy link

drews256 commented Jul 9, 2020

This is possibly a RN issue not a testing library issue. But, I have no issues running the app.

These tests have run fine on RN 0.59 to 0.62 but with the new LogBox work something is going wrong.

I'm guessing we're catching some sort of error and it's trying to throw up a logbox error but the app is torn down already. I'm not certain how to fix that, if it's actually an and just has to do with how I wrote the tests, let me know what you all think.

If I set LogBox.ignoreAllLogs(); it still errors in this same way.

Stack trace for one of the tests that is failing.

 ● Test suite failed to run

    TypeError: Cannot convert undefined or null to object
        at assign (<anonymous>)

      at _extends (node_modules/@babel/runtime/helpers/extends.js:16:19)
      at node_modules/@testing-library/react-native/dist/preset/mock-modules.js:41:25
      at Object.get unstable_batchedUpdates [as unstable_batchedUpdates] (node_modules/react-native/index.js:433:12)
      at Object.<anonymous> (node_modules/react-redux/lib/utils/reactBatchedUpdates.native.js:7:48)


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

      at parseErrorStack (node_modules/react-native/Libraries/Core/Devtools/parseErrorStack.js:52:26)
      at Immediate._onImmediate (node_modules/react-native/Libraries/LogBox/Data/LogBoxData.js:191:48)

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)
/Users/andrew/code/fontTest/node_modules/react-native/Libraries/LogBox/Data/LogBoxData.js:104
  ExceptionsManager.handleException(error, true);
                    ^

TypeError: ExceptionsManager.handleException is not a function
    at reportLogBoxError (/Users/andrew/code/fontTest/node_modules/react-native/Libraries/LogBox/Data/LogBoxData.js:104:21)
    at Immediate.<anonymous> (/Users/andrew/code/fontTest/node_modules/react-native/Libraries/LogBox/Data/LogBoxData.js:201:7)
    at processImmediate (internal/timers.js:439:21)

Note: Looks like I'm not the only one experiencing issues
https://gitmemory.com/issue/react-native-community/releases/186/637191780

❓ React Testing Library Resources

❓ Native Testing Library Resources

ISSUES WHICH ARE QUESTIONS WILL BE CLOSED

@daveols
Copy link
Contributor

daveols commented Jul 14, 2020

I've fixed this in #136 🎉

@daveols
Copy link
Contributor

daveols commented Jul 24, 2020

You can now upgrade to version 6.0.0 for these fixes! 🚀

@drews256
Copy link
Author

Yes, I'll test it out in the morning. Thanks so much @daveols!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants