This website works better with JavaScript.
Explore
Help
Sign In
pelias
/
api
mirror of
https://github.com/pelias/api.git
Watch
1
Star
0
Fork
You've already forked api
0
Code
Issues
Releases
Activity
1937
Commits
67
Branches
133
Tags
4.7 MiB
Tree:
74419bddc1
api
/
bin
/
units
6 lines
84 B
Raw
Normal View
History
Unescape
Escape
Handle fatal errors in unit tests Due to the way our unit tests are run, a fatal error in the API code that causes the node process to quit with an error will not be picked up by `tap-dot`, and the unit tests will still return a passing status code. This is due to the way status codes from pipes are handled by default. Fortunately, there is an ["unofficial bash strict mode"](http://redsymbol.net/articles/unofficial-bash-strict-mode/) that helps fix this sort of thing, and by running our unit tests with a few tweaks we can ensure that any failure in the unit tests is captured.
9 years ago
#!/bin/bash
set -euo pipefail
node test/unit/run.js | ./node_modules/.bin/tap-dot