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