install-ci-test.js 529 B

123456789101112131415161718192021222324
  1. // npm install-ci-test
  2. // Runs `npm ci` and then runs `npm test`
  3. const CI = require('./ci.js')
  4. class InstallCITest extends CI {
  5. static get description () {
  6. return 'Install a project with a clean slate and run tests'
  7. }
  8. /* istanbul ignore next - see test/lib/load-all-commands.js */
  9. static get name () {
  10. return 'install-ci-test'
  11. }
  12. exec (args, cb) {
  13. this.npm.commands.ci(args, (er) => {
  14. if (er)
  15. return cb(er)
  16. this.npm.commands.test([], cb)
  17. })
  18. }
  19. }
  20. module.exports = InstallCITest