Why not do something like this:
```Javascript
var failure = false;
vectors.each(function (v) {
  res=run_test(v);
  if (!res) {
    failure = true;
  }
}
if (failure) {
process.exit(1);
}
process.exit(0);
```