Browse files

Don't swallow non-test failures in npm test

  • Loading branch information...
1 parent 9ada359 commit e9700ff1195966356e497e812d2b8af7acbe6d3c @isaacs isaacs committed Jul 9, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/test.js
View
5 lib/test.js
@@ -6,6 +6,9 @@ var testCmd = require("./utils/lifecycle.js").cmd("test")
function test (args, cb) {
testCmd(args, function (er) {
if (!er) return cb()
- return cb("Test failed. See above for more details.")
+ if (er.code === "ELIFECYCLE") {
+ return cb("Test failed. See above for more details.")
+ }
+ return cb(er)
})
}

0 comments on commit e9700ff

Please sign in to comment.