You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

19 lines
393 B

module.exports = test
const testCmd = require('./utils/lifecycle.js').cmd('test')
const usage = require('./utils/usage')
test.usage = usage(
'test',
'npm test [-- <args>]'
)
function test (args, cb) {
testCmd(args, function (er) {
if (!er) return cb()
if (er.code === 'ELIFECYCLE') {
return cb('Test failed. See above for more details.')
}
return cb(er)
})
}