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

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test/lib
diff options
context:
space:
mode:
authornlf <quitlahok@gmail.com>2021-02-18 01:35:29 +0300
committernlf <quitlahok@gmail.com>2021-02-18 23:52:58 +0300
commit00afa316195f2db903146110a07ffdaec9bb6aa2 (patch)
tree084778fa19ee4c8ab1274ad053051bd5bc034732 /test/lib
parentaf4422cdbc110f93203667efc08b16f7aa74ac2f (diff)
restore the prefix on output from `npm version <inc>`nlf/restore-tag-prefix-on-version
PR-URL: https://github.com/npm/cli/pull/2718 Credit: @nlf Close: #2718 Reviewed-by: @wraithgar
Diffstat (limited to 'test/lib')
-rw-r--r--test/lib/version.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/lib/version.js b/test/lib/version.js
index f36132253..943e14370 100644
--- a/test/lib/version.js
+++ b/test/lib/version.js
@@ -6,6 +6,7 @@ let result = []
const noop = () => null
const npm = {
flatOptions: {
+ tagVersionPrefix: 'v',
json: false,
},
prefix: '',
@@ -144,17 +145,20 @@ t.test('with one arg', t => {
t.deepEqual(
opts,
{
+ tagVersionPrefix: 'v',
json: false,
path: '',
},
'should forward expected options'
)
- t.end()
+ return '4.0.0'
},
})
version(['major'], err => {
if (err)
throw err
+ t.same(result, ['v4.0.0'], 'outputs the new version prefixed by the tagVersionPrefix')
+ t.end()
})
})