@@ -12,7 +12,8 @@ cd "$(dirname "$0")"
1212function cleanup {
1313 echo ' Cleaning up.'
1414 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
1617 rm -rf $temp_cli_path $temp_app_path
1718}
1819
@@ -53,12 +54,9 @@ perl -i -p0e 's/bundledDependencies.*?]/bundledDependencies": []/s' package.json
5354npm install
5455scripts_path=$PWD /` npm pack`
5556
56- # lint
57+ # Lint
5758./node_modules/.bin/eslint --ignore-path .gitignore ./
5859
59- # Test local start command
60- npm start -- --smoke-test
61-
6260# Test local build command
6361npm run build
6462
@@ -69,9 +67,13 @@ test -e build/static/css/*.css
6967test -e build/static/media/* .svg
7068test -e build/favicon.ico
7169
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
7577
7678# Pack CLI
7779cd global-cli
@@ -99,9 +101,10 @@ test -e build/static/css/*.css
99101test -e build/static/media/* .svg
100102test -e build/favicon.ico
101103
102- # Run tests
103- npm run test
104- test -e src/__tests__/__snapshots__/App-test.js.snap
104+ # Run tests, overriding watch option to disable it
105+ npm test -- --watch=no
106+ # Uncomment when snapshot testing is enabled by default:
107+ # test -e src/__snapshots__/App.test.js.snap
105108
106109# Test the server
107110npm start -- --smoke-test
@@ -117,9 +120,10 @@ test -e build/static/css/*.css
117120test -e build/static/media/* .svg
118121test -e build/favicon.ico
119122
120- # Run tests
121- npm run test
122- test -e src/__tests__/__snapshots__/App-test.js.snap
123+ # Run tests, overriding watch option to disable it
124+ npm test -- --watch=no
125+ # Uncomment when snapshot testing is enabled by default:
126+ # test -e src/__snapshots__/App.test.js.snap
123127
124128# Test the server
125129npm start -- --smoke-test
0 commit comments