diff --git a/packages/react-scripts/fixtures/kitchensink/jest.integration.config.js b/packages/react-scripts/fixtures/kitchensink/jest.integration.config.js index fc778892493..01059d4d688 100644 --- a/packages/react-scripts/fixtures/kitchensink/jest.integration.config.js +++ b/packages/react-scripts/fixtures/kitchensink/jest.integration.config.js @@ -1,4 +1,5 @@ module.exports = { testEnvironment: 'node', testMatch: ['**/integration/*.test.js'], + transform: { '^.+\\.js$': './jest.transform.js' }, }; diff --git a/packages/react-scripts/fixtures/kitchensink/jest.transform.js b/packages/react-scripts/fixtures/kitchensink/jest.transform.js new file mode 100644 index 00000000000..247f1081b85 --- /dev/null +++ b/packages/react-scripts/fixtures/kitchensink/jest.transform.js @@ -0,0 +1,3 @@ +const babelOptions = { presets: ['react-app'] }; + +module.exports = require('babel-jest').createTransformer(babelOptions); diff --git a/tasks/e2e-kitchensink.sh b/tasks/e2e-kitchensink.sh index 345d0358b54..67429fdc585 100755 --- a/tasks/e2e-kitchensink.sh +++ b/tasks/e2e-kitchensink.sh @@ -146,10 +146,6 @@ PORT=3001 \ nohup yarn start &>$tmp_server_log & grep -q 'You can now view' <(tail -f $tmp_server_log) -# We haven't ejected yet which means there's no `babel` key -# in package.json yet -echo '{"presets":["react-app"]}' > .babelrc - # Test "development" environment E2E_URL="http://localhost:3001" \ REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \ diff --git a/tasks/local-test.sh b/tasks/local-test.sh index c9618dda2c9..43a74ae0ec5 100755 --- a/tasks/local-test.sh +++ b/tasks/local-test.sh @@ -10,7 +10,7 @@ function print_help { echo "OPTIONS:" echo " --node-version the node version to use while testing [8]" echo " --git-branch the git branch to checkout for testing [the current one]" - echo " --test-suite which test suite to use ('simple', installs', 'kitchensink', 'all') ['all']" + echo " --test-suite which test suite to use ('simple', installs', 'kitchensink', 'kitchensink-eject', 'all') ['all']" echo " --interactive gain a bash shell after the test run" echo " --help print this message and exit" echo "" @@ -49,7 +49,7 @@ while [ "$1" != "" ]; do shift done -test_command="./tasks/e2e-simple.sh && ./tasks/e2e-kitchensink.sh && ./tasks/e2e-installs.sh" +test_command="./tasks/e2e-simple.sh && ./tasks/e2e-kitchensink.sh && ./tasks/e2e-kitchensink-eject.sh && ./tasks/e2e-installs.sh" case ${test_suite} in "all") ;; @@ -59,6 +59,9 @@ case ${test_suite} in "kitchensink") test_command="./tasks/e2e-kitchensink.sh" ;; + "kitchensink-eject") + test_command="./tasks/e2e-kitchensink-eject.sh" + ;; "installs") test_command="./tasks/e2e-installs.sh" ;;