test.js 374 B

12345678910111213141516
  1. /* eslint-disable standard/no-callback-literal */
  2. module.exports = test
  3. const testCmd = require('./utils/lifecycle-cmd.js')('test')
  4. test.usage = testCmd.usage
  5. function test (args, cb) {
  6. testCmd(args, function (er) {
  7. if (!er) return cb()
  8. if (er.code === 'ELIFECYCLE') {
  9. return cb('Test failed. See above for more details.')
  10. }
  11. return cb(er)
  12. })
  13. }