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

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