node/deps/npm/lib/test.js

14 lines
294 B
JavaScript
Raw Normal View History

2012-06-22 07:44:22 +08:00
module.exports = test
var testCmd = require("./utils/lifecycle.js").cmd("test")
function test (args, cb) {
testCmd(args, function (er) {
if (!er) return cb()
2012-07-12 08:54:44 +08:00
if (er.code === "ELIFECYCLE") {
return cb("Test failed. See above for more details.")
}
return cb(er)
2012-06-22 07:44:22 +08:00
})
}