Skip to content

Commit f5399e4

Browse files
Swap create-react-app params in e2e scripts
1 parent 0c443c3 commit f5399e4

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

tasks/e2e-installs.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ npx create-react-app --version
120120
# ******************************************************************************
121121

122122
cd "$temp_app_path"
123-
npx create-react-app --scripts-version=@latest test-app-dist-tag
123+
npx create-react-app test-app-dist-tag --scripts-version=@latest
124124
cd test-app-dist-tag
125125

126126
# Check corresponding scripts version is installed and no TypeScript is present.
@@ -135,7 +135,7 @@ checkDependencies
135135
# ******************************************************************************
136136

137137
cd "$temp_app_path"
138-
npx create-react-app --scripts-version=1.0.17 test-app-version-number
138+
npx create-react-app test-app-version-number --scripts-version=1.0.17
139139
cd test-app-version-number
140140

141141
# Check corresponding scripts version is installed.
@@ -148,7 +148,7 @@ checkDependencies
148148
# ******************************************************************************
149149

150150
cd "$temp_app_path"
151-
npx create-react-app --use-npm --scripts-version=1.0.17 test-use-npm-flag
151+
npx create-react-app test-use-npm-flag --use-npm --scripts-version=1.0.17
152152
cd test-use-npm-flag
153153

154154
# Check corresponding scripts version is installed.
@@ -196,7 +196,7 @@ CI=true yarn test
196196
# ******************************************************************************
197197

198198
cd "$temp_app_path"
199-
npx create-react-app --scripts-version=https://registry.npmjs.org/react-scripts/-/react-scripts-1.0.17.tgz test-app-tarball-url
199+
npx create-react-app test-app-tarball-url --scripts-version=https://registry.npmjs.org/react-scripts/-/react-scripts-1.0.17.tgz
200200
cd test-app-tarball-url
201201

202202
# Check corresponding scripts version is installed.
@@ -209,7 +209,7 @@ checkDependencies
209209
# ******************************************************************************
210210

211211
cd "$temp_app_path"
212-
npx create-react-app --scripts-version=react-scripts-fork test-app-fork
212+
npx create-react-app test-app-fork --scripts-version=react-scripts-fork
213213
cd test-app-fork
214214

215215
# Check corresponding scripts version is installed.
@@ -221,7 +221,7 @@ exists node_modules/react-scripts-fork
221221

222222
cd "$temp_app_path"
223223
# we will install a non-existing package to simulate a failed installataion.
224-
npx create-react-app --scripts-version=`date +%s` test-app-should-not-exist || true
224+
npx create-react-app test-app-should-not-exist --scripts-version=`date +%s` || true
225225
# confirm that the project files were deleted
226226
test ! -e test-app-should-not-exist/package.json
227227
test ! -d test-app-should-not-exist/node_modules
@@ -234,7 +234,7 @@ cd "$temp_app_path"
234234
mkdir test-app-should-remain
235235
echo '## Hello' > ./test-app-should-remain/README.md
236236
# we will install a non-existing package to simulate a failed installataion.
237-
npx create-react-app --scripts-version=`date +%s` test-app-should-remain || true
237+
npx create-react-app test-app-should-remain --scripts-version=`date +%s` || true
238238
# confirm the file exist
239239
test -e test-app-should-remain/README.md
240240
# confirm only README.md and error log are the only files in the directory
@@ -248,7 +248,7 @@ fi
248248

249249
cd $temp_app_path
250250
curl "https://registry.npmjs.org/@enoah_netzach/react-scripts/-/react-scripts-0.9.0.tgz" -o enoah-scripts-0.9.0.tgz
251-
npx create-react-app --scripts-version=$temp_app_path/enoah-scripts-0.9.0.tgz test-app-scoped-fork-tgz
251+
npx create-react-app test-app-scoped-fork-tgz --scripts-version=$temp_app_path/enoah-scripts-0.9.0.tgz
252252
cd test-app-scoped-fork-tgz
253253

254254
# Check corresponding scripts version is installed.

tasks/e2e-kitchensink-eject.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ git clean -df
100100

101101
# Install the app in a temporary location
102102
cd $temp_app_path
103-
npx create-react-app --internal-testing-template="$root_path"/packages/react-scripts/fixtures/kitchensink test-kitchensink
103+
npx create-react-app test-kitchensink --internal-testing-template="$root_path"/packages/react-scripts/fixtures/kitchensink
104104

105105
# Install the test module
106106
cd "$temp_module_path"

tasks/e2e-kitchensink.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ git clean -df
100100

101101
# Install the app in a temporary location
102102
cd $temp_app_path
103-
npx create-react-app --internal-testing-template="$root_path"/packages/react-scripts/fixtures/kitchensink test-kitchensink
103+
npx create-react-app test-kitchensink --internal-testing-template="$root_path"/packages/react-scripts/fixtures/kitchensink
104104

105105
# Install the test module
106106
cd "$temp_module_path"

0 commit comments

Comments
 (0)