From eac8fcee2d29decacfe27261265330353fd4041f Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Sat, 20 Jan 2018 20:19:52 +0000 Subject: [PATCH] Fix integration test (#3879) * Fix integration test * More fixes --- tasks/e2e-installs.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tasks/e2e-installs.sh b/tasks/e2e-installs.sh index bcd616f3..e6723023 100755 --- a/tasks/e2e-installs.sh +++ b/tasks/e2e-installs.sh @@ -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 @@ -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