Welcome to mirror list, hosted at ThFree Co, Russian Federation.

restart.js « lib « test - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f29592d9bfcecc792d7d8d63e38ae9436c06006c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const t = require('tap')
let runArgs
const npm = {
  commands: {
    'run-script': (args, cb) => {
      runArgs = args
      cb()
    },
  },
}
const Restart = require('../../lib/restart.js')
const restart = new Restart(npm)
t.equal(restart.usage, 'npm restart [-- <args>]')
restart.exec(['foo'], () => {
  t.match(runArgs, ['restart', 'foo'])
  t.end()
})