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

get.js « lib « test - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a11597d2682db06797e126e7c5ec2d04de6d9ba6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const { test } = require('tap')
const requireInject = require('require-inject')

test('should retrieve values from npm.commands.config', (t) => {
  const Get = requireInject('../../lib/get.js')
  const get = new Get({
    commands: {
      config: ([action, arg]) => {
        t.equal(action, 'get', 'should use config get action')
        t.equal(arg, 'foo', 'should use expected key')
        t.end()
      },
    },
  })

  get.exec(['foo'])
})