2016-01-28 18:11:35 -08:00
|
|
|
// npm install-test
|
|
|
|
// Runs `npm install` and then runs `npm test`
|
|
|
|
|
2021-03-11 17:54:23 -05:00
|
|
|
const Install = require('./install.js')
|
2016-01-28 18:11:35 -08:00
|
|
|
|
2021-03-11 17:54:23 -05:00
|
|
|
class InstallTest extends Install {
|
2021-03-23 14:58:11 -04:00
|
|
|
static get description () {
|
|
|
|
return 'Install package(s) and run tests'
|
|
|
|
}
|
|
|
|
|
2021-03-11 17:54:23 -05:00
|
|
|
/* istanbul ignore next - see test/lib/load-all-commands.js */
|
|
|
|
static get name () {
|
|
|
|
return 'install-test'
|
2021-03-04 17:40:28 -05:00
|
|
|
}
|
2016-01-28 18:11:35 -08:00
|
|
|
|
2021-03-04 17:40:28 -05:00
|
|
|
exec (args, cb) {
|
|
|
|
this.npm.commands.install(args, (er) => {
|
|
|
|
if (er)
|
|
|
|
return cb(er)
|
|
|
|
this.npm.commands.test([], cb)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
module.exports = InstallTest
|