diff options
Diffstat (limited to 'lib/install-ci-test.js')
-rw-r--r-- | lib/install-ci-test.js | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/lib/install-ci-test.js b/lib/install-ci-test.js index 26120f4a2..52c41c413 100644 --- a/lib/install-ci-test.js +++ b/lib/install-ci-test.js @@ -1,26 +1,19 @@ -'use strict' - // npm install-ci-test // Runs `npm ci` and then runs `npm test` -module.exports = installTest -var ci = require('./ci.js') -var test = require('./test.js') -var usage = require('./utils/usage') +const ci = require('./ci.js') +const test = require('./test.js') +const usageUtil = require('./utils/usage.js') -installTest.usage = usage( +const usage = usageUtil( 'install-ci-test', - '\nnpm install-ci-test [args]' + + 'npm install-ci-test [args]' + '\nSame args as `npm ci`' ) -installTest.completion = ci.completion +const completion = ci.completion + +const ciTest = (args, cb) => + ci(args, er => er ? cb(er) : test([], cb)) -function installTest (args, cb) { - ci(args, function (er) { - if (er) { - return cb(er) - } - test([], cb) - }) -} +module.exports = Object.assign(ciTest, { usage, completion }) |