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

stop.js « lib « test - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e6cb193b6297331549b1f34d94a7e41115c491e7 (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 Stop = require('../../lib/stop.js')
const stop = new Stop(npm)
t.equal(stop.usage, 'npm stop [-- <args>]')
stop.exec(['foo'], () => {
  t.match(runArgs, ['stop', 'foo'])
  t.end()
})