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-11-04 20:42:47 +00:00
|
|
|
async exec (args, cb) {
|
|
|
|
await this.npm.exec('install', args)
|
|
|
|
return this.npm.exec('test', [])
|
2021-03-04 17:40:28 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
module.exports = InstallTest
|