xref: /third_party/node/deps/npm/test/lib/commands/get.js (revision 1cb0ef41)
1const t = require('tap')
2const { load: loadMockNpm } = require('../../fixtures/mock-npm')
3
4t.test('should retrieve values from config', async t => {
5  const name = 'editor'
6  const value = 'vigor'
7  const { joinedOutput, npm } = await loadMockNpm(t, {
8    config: { [name]: value },
9  })
10  await npm.exec('get', [name])
11  t.equal(
12    joinedOutput(),
13    value,
14    'outputs config item'
15  )
16})
17