File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -160,8 +160,9 @@ exists node_modules/react-scripts-fork
160160cd  " $temp_app_path " 
161161#  we will install a non-existing package to simulate a failed installataion.
162162npx create-react-app --scripts-version=` date +%s`   test-app-should-not-exist ||  true 
163- #  confirm that the project folder was deleted
164- test  !  -d test-app-should-not-exist
163+ #  confirm that the project files were deleted
164+ test  !  -e test-app-should-not-exist/package.json
165+ test  !  -d test-app-should-not-exist/node_modules
165166
166167#  ******************************************************************************
167168#  Test project folder is not deleted when creating app over existing folder
@@ -174,8 +175,8 @@ echo '## Hello' > ./test-app-should-remain/README.md
174175npx create-react-app --scripts-version=` date +%s`   test-app-should-remain ||  true 
175176#  confirm the file exist
176177test  -e test-app-should-remain/README.md
177- #  confirm only README.md is  the only file  in the directory
178- if  [ " $( ls -1 ./test-app-should-remain |  wc -l |  tr -d ' [:space:]' ) "   !=  " 1 "   ];  then 
178+ #  confirm only README.md and error log are  the only files  in the directory
179+ if  [ " $( ls -1 ./test-app-should-remain |  wc -l |  tr -d ' [:space:]' ) "   !=  " 2 "   ];  then 
179180 false 
180181fi 
181182
                                 You can’t perform that action at this time. 
               
                  
0 commit comments