install-test.js 507 B

1234567891011121314151617181920212223242526
  1. 'use strict'
  2. // npm install-test
  3. // Runs `npm install` and then runs `npm test`
  4. module.exports = installTest
  5. var install = require('./install.js')
  6. var test = require('./test.js')
  7. var usage = require('./utils/usage')
  8. installTest.usage = usage(
  9. 'install-test',
  10. '\nnpm install-test [args]' +
  11. '\nSame args as `npm install`'
  12. )
  13. installTest.completion = install.completion
  14. function installTest (args, cb) {
  15. install(args, function (er) {
  16. if (er) {
  17. return cb(er)
  18. }
  19. test([], cb)
  20. })
  21. }