Fix tests in template project (0.58-stable)#23128
Fix tests in template project (0.58-stable)#23128grabbou merged 3 commits intofacebook:0.58-stablefrom
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 |
|
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: