All files / lib/utils lifecycle-cmd.js

100% Statements 8/8
100% Branches 0/0
100% Functions 2/2
100% Lines 7/7

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13      1x 1x   1x 1x 1x 1x 1x    
// The implementation of commands that are just "run a script"
// test, start, stop, restart
 
const npm = require('../npm.js')
const usageUtil = require('./usage.js')
 
module.exports = stage => {
  const cmd = (args, cb) => npm.commands.run([stage, ...args], cb)
  const usage = usageUtil(stage, `npm ${stage} [-- <args>]`)
  const completion = require('./completion/none.js')
  return Object.assign(cmd, { usage, completion })
}