install-ci-test.js 486 B

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