Skip to content

Commit eac8fce

Browse files
authored
Fix integration test (facebook#3879)
* Fix integration test * More fixes
1 parent 39126a1 commit eac8fce

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tasks/e2e-installs.sh

+5-4
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,9 @@ exists node_modules/react-scripts-fork
160160
cd "$temp_app_path"
161161
# we will install a non-existing package to simulate a failed installataion.
162162
npx 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
174175
npx create-react-app --scripts-version=`date +%s` test-app-should-remain || true
175176
# confirm the file exist
176177
test -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
180181
fi
181182

0 commit comments

Comments
 (0)