Skip to content
This repository was archived by the owner on Jan 26, 2019. It is now read-only.

Commit a03524c

Browse files
authored
Use latest npm in e2e tests (#3735)
* Use latest npm in e2e tests * Keep default npm version in "simple" test * Try to fix CI by using a version that supports Yarn
1 parent 7b881f1 commit a03524c

File tree

3 files changed

+8
-18
lines changed

3 files changed

+8
-18
lines changed

tasks/e2e-installs.sh

+7-10
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,7 @@ fi
9393

9494
if hash npm 2>/dev/null
9595
then
96-
# npm 5 is too buggy right now
97-
if [ $(npm -v | head -c 1) -eq 5 ]; then
98-
npm i -g npm@^4.x
99-
fi;
96+
npm i -g npm@latest
10097
npm cache clean || npm cache verify
10198
fi
10299

@@ -137,39 +134,39 @@ npm install "$cli_path"
137134
# ******************************************************************************
138135

139136
cd "$temp_app_path"
140-
create_react_app --scripts-version=0.4.0 test-app-version-number
137+
create_react_app --scripts-version=1.0.17 test-app-version-number
141138
cd test-app-version-number
142139

143140
# Check corresponding scripts version is installed.
144141
exists node_modules/react-scripts
145-
grep '"version": "0.4.0"' node_modules/react-scripts/package.json
142+
grep '"version": "1.0.17"' node_modules/react-scripts/package.json
146143
checkDependencies
147144

148145
# ******************************************************************************
149146
# Test --use-npm flag
150147
# ******************************************************************************
151148

152149
cd "$temp_app_path"
153-
create_react_app --use-npm --scripts-version=0.4.0 test-use-npm-flag
150+
create_react_app --use-npm --scripts-version=1.0.17 test-use-npm-flag
154151
cd test-use-npm-flag
155152

156153
# Check corresponding scripts version is installed.
157154
exists node_modules/react-scripts
158155
[ ! -e "yarn.lock" ] && echo "yarn.lock correctly does not exist"
159-
grep '"version": "0.4.0"' node_modules/react-scripts/package.json
156+
grep '"version": "1.0.17"' node_modules/react-scripts/package.json
160157
checkDependencies
161158

162159
# ******************************************************************************
163160
# Test --scripts-version with a tarball url
164161
# ******************************************************************************
165162

166163
cd "$temp_app_path"
167-
create_react_app --scripts-version=https://registry.npmjs.org/react-scripts/-/react-scripts-0.4.0.tgz test-app-tarball-url
164+
create_react_app --scripts-version=https://registry.npmjs.org/react-scripts/-/react-scripts-1.0.17.tgz test-app-tarball-url
168165
cd test-app-tarball-url
169166

170167
# Check corresponding scripts version is installed.
171168
exists node_modules/react-scripts
172-
grep '"version": "0.4.0"' node_modules/react-scripts/package.json
169+
grep '"version": "1.0.17"' node_modules/react-scripts/package.json
173170
checkDependencies
174171

175172
# ******************************************************************************

tasks/e2e-kitchensink.sh

+1-4
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,7 @@ fi
110110

111111
if hash npm 2>/dev/null
112112
then
113-
# npm 5 is too buggy right now
114-
if [ $(npm -v | head -c 1) -eq 5 ]; then
115-
npm i -g npm@^4.x
116-
fi;
113+
npm i -g npm@latest
117114
npm cache clean || npm cache verify
118115
fi
119116

tasks/e2e-simple.sh

-4
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,6 @@ fi
122122

123123
if hash npm 2>/dev/null
124124
then
125-
# npm 5 is too buggy right now
126-
if [ $(npm -v | head -c 1) -eq 5 ]; then
127-
npm i -g npm@^4.x
128-
fi;
129125
npm cache clean || npm cache verify
130126
fi
131127

0 commit comments

Comments
 (0)