-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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 tests in template project (0.58-stable) #23128
Fix tests in template project (0.58-stable) #23128
Conversation
PR facebook#18019 Removed __tests__ and __fixtures__ folders from npm package. But it also effectively removed __tests__ folder from initial project template. This commit restores __tests__ in template application. It applicable only to 0.58-stable branch because in master, templates was moved to another location. I think we should recheck what is ignored in master after this landed.
… init new project. This should fix tests with babel7.
Generated by 🚫 dangerJS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for working on this! Since the PR is against 0.58-stable, I can't land it, but @grabbou or anyone else with write access who is working on the 0.58 release can push these changes to the 0.58-stable branch directly. Let me know if I can help with that. |
Awesome! Thank you so much for working on it! Shall we also make sure this works on master? I think the only difference is that there's no templates/HelloWorld but template. |
@grabbou Yes, I'll check and make PRs needed for land this changes to master. I think that even changes to react-native-cli will not be needed, because:
|
* Restore __tests__ folder in HelloWorld template PR facebook#18019 Removed __tests__ and __fixtures__ folders from npm package. But it also effectively removed __tests__ folder from initial project template. This commit restores __tests__ in template application. It applicable only to 0.58-stable branch because in master, templates was moved to another location. I think we should recheck what is ignored in master after this landed. * Use babel.config.js in template HelloWorld application * Add babel-core@^7.0.0-bridge.0 to jest dependencies when react-native init new project. This should fix tests with babel7.
This fixes template application sample tests.
Unfortunately some changes can't be applied to master branch because of cli extraction. Moreover some changes (probably addition of babel-core to deps) will not be needed when jest 24 will be released. So this is path specially for 0.58-stable branch.
I think after apply this, we also should do some things:
Changelog:
[General] [Fixed] - Fix tests in template HelloWorld application
Test Plan: