Skip to content

Commit

Permalink
Merge pull request #68 from pelias/safely-run-tests
Browse files Browse the repository at this point in the history
chore(test): Use dedicated test script to catch errors
  • Loading branch information
orangejulius authored Sep 13, 2018
2 parents 0e1eea2 + 8925432 commit 2f2ce6c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions bin/units
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

# run tests with pipefail to avoid false passes
# see https://github.com/pelias/pelias/issues/744
set -o pipefail

node test/run.js | npx tap-spec
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"homepage": "https://github.com/pelias/pbf2json",
"license": "MIT",
"scripts": {
"units": "node test/run.js | tap-spec",
"units": "./bin/units",
"test": "npm run units",
"pretest": "test/pretest.sh",
"end-to-end": "npm run pretest; node test/end-to-end.js;",
Expand Down

0 comments on commit 2f2ce6c

Please sign in to comment.