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
diff options
context:
space:
mode:
authorRuy Adorno <ruyadorno@hotmail.com>2020-11-10 23:27:59 +0300
committerisaacs <i@izs.me>2020-11-13 22:22:56 +0300
commit2a80c67ef8c12c3d9d254f5be6293a6461067d99 (patch)
tree8fa29e311d962e48b3701eb810bd9fc5c7b37766 /test/lib/utils
parent786e36404068fd51657ddac766e066a98754edbf (diff)
fix: legacy auth tokens
Add legacy `_auth` token to flatOptions in order to support it when reaching out to registries. Fixes: #2008 Credit: @ruyadorno Close: #2153 Reviewed-by: @isaacs
Diffstat (limited to 'test/lib/utils')
-rw-r--r--test/lib/utils/flat-options.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/lib/utils/flat-options.js b/test/lib/utils/flat-options.js
index d3b8b89bc..7601c78d2 100644
--- a/test/lib/utils/flat-options.js
+++ b/test/lib/utils/flat-options.js
@@ -291,6 +291,18 @@ t.test('various default values and falsey fallbacks', t => {
t.end()
})
+t.test('legacy _auth token', t => {
+ const npm = new Mocknpm({
+ _auth: 'asdfasdf',
+ })
+ t.strictSame(
+ flatOptions(npm)._auth,
+ 'asdfasdf',
+ 'should set legacy _auth token',
+ )
+ t.end()
+})
+
t.test('save-type', t => {
const base = {
'save-optional': false,