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 integration test #3879

Merged
merged 2 commits into from
Jan 20, 2018
Merged
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
9 changes: 5 additions & 4 deletions tasks/e2e-installs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,9 @@ exists node_modules/react-scripts-fork
cd "$temp_app_path"
# we will install a non-existing package to simulate a failed installataion.
npx create-react-app --scripts-version=`date +%s` test-app-should-not-exist || true
# confirm that the project folder was deleted
test ! -d test-app-should-not-exist
# confirm that the project files were deleted
test ! -e test-app-should-not-exist/package.json
test ! -d test-app-should-not-exist/node_modules

# ******************************************************************************
# Test project folder is not deleted when creating app over existing folder
Expand All @@ -174,8 +175,8 @@ echo '## Hello' > ./test-app-should-remain/README.md
npx create-react-app --scripts-version=`date +%s` test-app-should-remain || true
# confirm the file exist
test -e test-app-should-remain/README.md
# confirm only README.md is the only file in the directory
if [ "$(ls -1 ./test-app-should-remain | wc -l | tr -d '[:space:]')" != "1" ]; then
# confirm only README.md and error log are the only files in the directory
if [ "$(ls -1 ./test-app-should-remain | wc -l | tr -d '[:space:]')" != "2" ]; then
false
fi

Expand Down