Skip to content

Commit

Permalink
Remove some tests for futures I don't care about
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceK33z committed Feb 14, 2017
1 parent fc0312c commit 24b8da6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 67 deletions.
11 changes: 0 additions & 11 deletions tasks/e2e-installs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,6 @@ cli_path=$PWD/`npm pack`
cd $temp_cli_path
npm install $cli_path

# ******************************************************************************
# Test --scripts-version with a custom fork of react-cy-scripts
# ******************************************************************************

cd $temp_app_path
create_react_app --scripts-version=react-cy-scripts-fork test-app-fork
cd test-app-fork

# Check corresponding scripts version is installed.
exists node_modules/react-cy-scripts-fork

# ******************************************************************************
# Test nested folder path as the project name
# ******************************************************************************
Expand Down
58 changes: 2 additions & 56 deletions tasks/e2e-kitchensink.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ then
fi

# ******************************************************************************
# First, pack react-cy-scripts and create-react-app so we can use them.
# First, pack react-cy-scripts and create-react-cy-app so we can use them.
# ******************************************************************************

# Pack CLI
Expand Down Expand Up @@ -110,7 +110,7 @@ cd $temp_app_path
create_react_app --scripts-version=$scripts_path --internal-testing-template=$root_path/packages/react-cy-scripts/fixtures/kitchensink test-kitchensink

# ******************************************************************************
# Now that we used create-react-app to create an app depending on react-cy-scripts,
# Now that we used create-react-cy-app to create an app depending on react-cy-scripts,
# let's make sure all npm scripts are in the working state.
# ******************************************************************************

Expand Down Expand Up @@ -158,59 +158,5 @@ E2E_FILE=./build/index.html \
PUBLIC_URL=http://www.example.org/spa/ \
node_modules/.bin/mocha --require babel-register --require babel-polyfill integration/*.test.js

# ******************************************************************************
# Finally, let's check that everything still works after ejecting.
# ******************************************************************************

# Unlink our preset
npm unlink $root_path/packages/babel-preset-react-cy-app

# Eject...
echo yes | npm run eject

# ...but still link to the local packages
npm link $root_path/packages/babel-preset-react-cy-app
npm link $root_path/packages/eslint-config-react-app
npm link $root_path/packages/react-cy-dev-utils
npm link $root_path/packages/react-cy-scripts

# Test the build
REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \
NODE_PATH=src \
PUBLIC_URL=http://www.example.org/spa/ \
npm run build

# Check for expected output
exists build/*.html
exists build/static/js/main.*.js

# Unit tests
REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \
CI=true \
NODE_PATH=src \
NODE_ENV=test \
npm test -- --no-cache --testPathPattern="/src/"

# Test "development" environment
tmp_server_log=`mktemp`
PORT=3002 \
REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \
NODE_PATH=src \
nohup npm start &>$tmp_server_log &
grep -q 'The app is running at:' <(tail -f $tmp_server_log)
E2E_URL="http://localhost:3002" \
REACT_APP_SHELL_ENV_MESSAGE=fromtheshell \
CI=true NODE_PATH=src \
NODE_ENV=development \
node_modules/.bin/mocha --require babel-register --require babel-polyfill integration/*.test.js

# Test "production" environment
E2E_FILE=./build/index.html \
CI=true \
NODE_ENV=production \
NODE_PATH=src \
PUBLIC_URL=http://www.example.org/spa/ \
node_modules/.bin/mocha --require babel-register --require babel-polyfill integration/*.test.js

# Cleanup
cleanup

0 comments on commit 24b8da6

Please sign in to comment.