Skip to content

Commit 27c2613

Browse files
authored
Fix npm test script to fail on error
1 parent abfc711 commit 27c2613

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ matrix:
1010
- node_js: "10"
1111
script: npm run test-es6
1212
- node_js: "12"
13-
script: npm run test
13+
script: npm run test

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
],
4949
"types": "types",
5050
"scripts": {
51-
"test": "node_v=$(node --version)z\nif [[ \"${node_v%%.*z}\" == 'v4' ]]\nthen\nnpm run test-es5\nelse\necho 10 && npm run test-es6\nfi\nnpm run dtslint",
51+
"test": "set -e node_v=$(node --version)z\nif [[ \"${node_v%%.*z}\" == 'v4' ]]\nthen\nnpm run test-es5\nelse\nnpm run test-es6\nfi\nnpm run dtslint",
5252
"dtslint": "dtslint --expectOnly --localTs node_modules/typescript/lib types ",
5353
"lint": "eslint .",
5454
"compile": "node_modules/.bin/babel lib --out-dir lib-es5 --delete-dir-on-start --verbose",
@@ -61,3 +61,4 @@
6161
"node": ">=0.6"
6262
}
6363
}
64+

0 commit comments

Comments
 (0)