@@ -12,7 +12,8 @@ cd "$(dirname "$0")"
12
12
function cleanup {
13
13
echo ' Cleaning up.'
14
14
cd $initial_path
15
- rm ../template/src/__tests__/__snapshots__/App-test.js.snap
15
+ # Uncomment when snapshot testing is enabled by default:
16
+ # rm ../template/src/__snapshots__/App.test.js.snap
16
17
rm -rf $temp_cli_path $temp_app_path
17
18
}
18
19
@@ -53,12 +54,9 @@ perl -i -p0e 's/bundledDependencies.*?]/bundledDependencies": []/s' package.json
53
54
npm install
54
55
scripts_path=$PWD /` npm pack`
55
56
56
- # lint
57
+ # Lint
57
58
./node_modules/.bin/eslint --ignore-path .gitignore ./
58
59
59
- # Test local start command
60
- npm start -- --smoke-test
61
-
62
60
# Test local build command
63
61
npm run build
64
62
@@ -69,9 +67,13 @@ test -e build/static/css/*.css
69
67
test -e build/static/media/* .svg
70
68
test -e build/favicon.ico
71
69
72
- # Run tests
73
- npm run test
74
- test -e template/src/__tests__/__snapshots__/App-test.js.snap
70
+ # Run tests, overriding watch option to disable it
71
+ npm test -- --watch=no
72
+ # Uncomment when snapshot testing is enabled by default:
73
+ # test -e template/src/__snapshots__/App.test.js.snap
74
+
75
+ # Test local start command
76
+ npm start -- --smoke-test
75
77
76
78
# Pack CLI
77
79
cd global-cli
@@ -99,10 +101,10 @@ test -e build/static/css/*.css
99
101
test -e build/static/media/* .svg
100
102
test -e build/favicon.ico
101
103
102
- # Run tests
103
- npm test --smoke-test
104
+ # Run tests, overriding watch option to disable it
105
+ npm test -- --watch=no
104
106
# Uncomment when snapshot testing is enabled by default:
105
- # test -e src/__tests__/ __snapshots__/App- test.js.snap
107
+ # test -e src/__snapshots__/App. test.js.snap
106
108
107
109
# Test the server
108
110
npm start -- --smoke-test
@@ -118,10 +120,10 @@ test -e build/static/css/*.css
118
120
test -e build/static/media/* .svg
119
121
test -e build/favicon.ico
120
122
121
- # Run tests
122
- npm test -- --smoke-test
123
+ # Run tests, overriding watch option to disable it
124
+ npm test -- --watch=no
123
125
# Uncomment when snapshot testing is enabled by default:
124
- # test -e src/__tests__/ __snapshots__/App- test.js.snap
126
+ # test -e src/__snapshots__/App. test.js.snap
125
127
126
128
# Test the server
127
129
npm start -- --smoke-test
0 commit comments