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

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/test/lib/dist-tag.js')
-rw-r--r--deps/npm/test/lib/dist-tag.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/deps/npm/test/lib/dist-tag.js b/deps/npm/test/lib/dist-tag.js
index 701bdc6e48c..6bc17168cdc 100644
--- a/deps/npm/test/lib/dist-tag.js
+++ b/deps/npm/test/lib/dist-tag.js
@@ -68,10 +68,9 @@ const DistTag = t.mock('../../lib/dist-tag.js', {
},
})
+const config = {}
const npm = mockNpm({
- config: {
- global: false,
- },
+ config,
output: msg => {
result = result ? [result, msg].join('\n') : msg
},
@@ -349,6 +348,10 @@ t.test('add using valid semver range as name', (t) => {
t.test('add missing args', (t) => {
npm.prefix = t.testdir({})
+ config.tag = ''
+ t.teardown(() => {
+ delete config.tag
+ })
distTag.exec(['add', '@scoped/another@7.7.7'], (err) => {
t.matchSnapshot(err, 'should exit usage error message')
t.end()