xref: /third_party/node/deps/npm/test/lib/commands/get.js
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/deps/npm/test/lib/commands/
11cb0ef41Sopenharmony_ciconst t = require('tap')
21cb0ef41Sopenharmony_ciconst { load: loadMockNpm } = require('../../fixtures/mock-npm')
31cb0ef41Sopenharmony_ci
41cb0ef41Sopenharmony_cit.test('should retrieve values from config', async t => {
51cb0ef41Sopenharmony_ci  const name = 'editor'
61cb0ef41Sopenharmony_ci  const value = 'vigor'
71cb0ef41Sopenharmony_ci  const { joinedOutput, npm } = await loadMockNpm(t, {
81cb0ef41Sopenharmony_ci    config: { [name]: value },
91cb0ef41Sopenharmony_ci  })
101cb0ef41Sopenharmony_ci  await npm.exec('get', [name])
111cb0ef41Sopenharmony_ci  t.equal(
121cb0ef41Sopenharmony_ci    joinedOutput(),
131cb0ef41Sopenharmony_ci    value,
141cb0ef41Sopenharmony_ci    'outputs config item'
151cb0ef41Sopenharmony_ci  )
161cb0ef41Sopenharmony_ci})
17

Indexes created Thu Nov 07 10:32:03 CST 2024