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

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

t.test('should retrieve values from npm.commands.config', (t) => {
  const Get = t.mock('../../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'])
})