Skip to content
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

Merged
merged 3 commits into from
Jan 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions local-cli/.npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
__fixtures__
__tests__
!/templates/HelloWorld/__tests__
1 change: 1 addition & 0 deletions local-cli/generator/copyProjectTemplateAndReplace.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ function translateFilePath(path) {
.replace('_BUCK', 'BUCK')
.replace('_gitignore', '.gitignore')
.replace('_gitattributes', '.gitattributes')
.replace('_babel.config.js', 'babel.config.js')
.replace('_babelrc', '.babelrc')
.replace('_flowconfig', '.flowconfig')
.replace('_buckconfig', '.buckconfig')
Expand Down
2 changes: 1 addition & 1 deletion local-cli/init/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function generateProject(destinationRoot, newProjectName, options) {
});
}
if (!options['skip-jest']) {
const jestDeps = `jest babel-jest metro-react-native-babel-preset react-test-renderer@${reactVersion}`;
const jestDeps = `jest babel-core@^7.0.0-bridge.0 babel-jest metro-react-native-babel-preset react-test-renderer@${reactVersion}`;
if (yarnVersion) {
console.log('Adding Jest...');
execSync(`yarn add ${jestDeps} --dev --exact`, {stdio: 'inherit'});
Expand Down
3 changes: 3 additions & 0 deletions local-cli/templates/HelloWorld/_babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: ["module:metro-react-native-babel-preset"]
}
3 changes: 0 additions & 3 deletions local-cli/templates/HelloWorld/_babelrc

This file was deleted.