Skip to content

Commit 63398bd

Browse files
Jack ZhaoTimer
Jack Zhao
authored andcommitted
Remove babelrc dependency for kitchensink test (#5098)
* add kitchensink-eject to local-test * add jest transform Closes #5095
1 parent 725d388 commit 63398bd

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
module.exports = {
22
testEnvironment: 'node',
33
testMatch: ['**/integration/*.test.js'],
4+
transform: { '^.+\\.js$': './jest.transform.js' },
45
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const babelOptions = { presets: ['react-app'] };
2+
3+
module.exports = require('babel-jest').createTransformer(babelOptions);

tasks/e2e-kitchensink.sh

-4
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,6 @@ PORT=3001 \
146146
nohup yarn start &>$tmp_server_log &
147147
grep -q 'You can now view' <(tail -f $tmp_server_log)
148148

149-
# We haven't ejected yet which means there's no `babel` key
150-
# in package.json yet
151-
echo '{"presets":["react-app"]}' > .babelrc
152-
153149
# Test "development" environment
154150
E2E_URL="http://localhost:3001" \
155151
REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \

tasks/local-test.sh

+5-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function print_help {
1010
echo "OPTIONS:"
1111
echo " --node-version <version> the node version to use while testing [8]"
1212
echo " --git-branch <branch> the git branch to checkout for testing [the current one]"
13-
echo " --test-suite <suite> which test suite to use ('simple', installs', 'kitchensink', 'all') ['all']"
13+
echo " --test-suite <suite> which test suite to use ('simple', installs', 'kitchensink', 'kitchensink-eject', 'all') ['all']"
1414
echo " --interactive gain a bash shell after the test run"
1515
echo " --help print this message and exit"
1616
echo ""
@@ -49,7 +49,7 @@ while [ "$1" != "" ]; do
4949
shift
5050
done
5151

52-
test_command="./tasks/e2e-simple.sh && ./tasks/e2e-kitchensink.sh && ./tasks/e2e-installs.sh"
52+
test_command="./tasks/e2e-simple.sh && ./tasks/e2e-kitchensink.sh && ./tasks/e2e-kitchensink-eject.sh && ./tasks/e2e-installs.sh"
5353
case ${test_suite} in
5454
"all")
5555
;;
@@ -59,6 +59,9 @@ case ${test_suite} in
5959
"kitchensink")
6060
test_command="./tasks/e2e-kitchensink.sh"
6161
;;
62+
"kitchensink-eject")
63+
test_command="./tasks/e2e-kitchensink-eject.sh"
64+
;;
6265
"installs")
6366
test_command="./tasks/e2e-installs.sh"
6467
;;

0 commit comments

Comments
 (0)