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

[internal] remove babelrc dependency for kitchensink test #5098

Merged
merged 2 commits into from
Sep 26, 2018
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
testEnvironment: 'node',
testMatch: ['**/integration/*.test.js'],
transform: { '^.+\\.js$': './jest.transform.js' },
};
3 changes: 3 additions & 0 deletions packages/react-scripts/fixtures/kitchensink/jest.transform.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const babelOptions = { presets: ['react-app'] };

module.exports = require('babel-jest').createTransformer(babelOptions);
4 changes: 0 additions & 4 deletions tasks/e2e-kitchensink.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
7 changes: 5 additions & 2 deletions tasks/local-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function print_help {
echo "OPTIONS:"
echo " --node-version <version> the node version to use while testing [8]"
echo " --git-branch <branch> the git branch to checkout for testing [the current one]"
echo " --test-suite <suite> which test suite to use ('simple', installs', 'kitchensink', 'all') ['all']"
echo " --test-suite <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 ""
Expand Down Expand Up @@ -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")
;;
Expand 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"
;;
Expand Down