-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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: set testEnvironment to jsdom in react native example #12581
Conversation
Just tried this trick locally and it is fixing the issue I was mentioning in #12558 (comment). Let’s see what CI thinks. Ah! CircleCI passed. Well done @F3n67u! |
@mrazauskas It's caused by #12553. |
I set testEnvironment to jsdom when testing react-native so that react native example will not be affected by jest-environment-node. what do you think? @mrazauskas |
This also solves the problem. I just think wouldn’t it be better idea to add it to |
@mrazauskas I agree with you. I think it would be better to set I haven't any experience with react-native either. I will spend some time investigating. |
@SimenB created the react-native preset. do you have any advice here? |
Thankfully, all I did was move it from json to js 🙂 What they should do is create their own test environment rather than use the built-in node or jsdom ones... It's neither in practice. But I doubt that's going to happen. The change in this PR should be made in the preset though, not in the example in this repo. |
@SimenB So your advice is to file a pr to change testEnviroment to |
Yep! |
I will do it! thanks for your advice. |
No idea if they'll accept it - as mentioned neither node or jsdom is correct for them. We can land the PR here in the meantime if it unlocks something (I'm on vacation this week, so haven't looked into anything) |
I think it's a good idea. The broken ci make our contributor confused. we could merge this pr first. Sorry to disturb your vacation time. |
@F3n67u It also might be good idea to send a PR to |
By the way, it might be that the issue is already fix on React side. See facebook/react#20756. The bug was inside |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
Test plan