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: 30e26b7453fe8cc6e56d47482069e2c4b5672820 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const t = require('tap')
const { real: mockNpm } = require('../fixtures/mock-npm')

t.test('should retrieve values from config', async t => {
  const { joinedOutput, command, npm } = mockNpm(t)
  const name = 'editor'
  const value = 'vigor'
  await npm.load()
  npm.config.set(name, value)
  await command('get', [name])
  t.equal(
    joinedOutput(),
    value,
    'outputs config item'
  )
})