Skip to content

Commit

Permalink
test with bail by default
Browse files Browse the repository at this point in the history
  • Loading branch information
okv committed Dec 26, 2019
1 parent 794fd14 commit a661c40
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,14 @@ before_script:
- npm install mongodb@${MONGODB_DRIVER_VERSION}

script:
- npm test
- >
nodeVersionMajor=`node --version | grep -Eo 'v[0-9]+' | sed 's/v//'`;
if [ $nodeVersionMajor -gt 4 ]; then
npm test;
else
npm run testWithoutBail;
fi;
- >
nodeVersionMajor=`node --version | grep -Eo 'v[0-9]+' | sed 's/v//'`;
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"mongodb"
],
"scripts": {
"test": "tape \"test/**/*.test.js\" | tap-dot",
"test": "tape \"test/**/*.test.js\" | tap_bail | tap-dot",
"testWithoutBail": "tape \"test/**/*.test.js\" | tap-dot",
"makeCodeCoverageSummaryReport": "nyc --reporter text-summary npm test",
"makeCodeCoverageDetailReport": "nyc --reporter=lcov --reporter html npm test"
},
Expand Down

0 comments on commit a661c40

Please sign in to comment.