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
diff options
context:
space:
mode:
authorLuke Karrys <luke@lukekarrys.com>2022-04-13 09:29:30 +0300
committerNathan Fritz <fritzy@github.com>2022-04-14 00:35:52 +0300
commitc057b90d0954ff5b6f2973748ae5d41885b99213 (patch)
tree2736a47b5d9e50c0362eeaec7a4146f5bfa65b28 /test
parentaa4a4da336a6ec1963394fdbd06acb173c842d26 (diff)
feat(config): warn on deprecated configs
Diffstat (limited to 'test')
-rw-r--r--test/lib/auth/sso.js17
-rw-r--r--test/lib/commands/install.js7
2 files changed, 2 insertions, 22 deletions
diff --git a/test/lib/auth/sso.js b/test/lib/auth/sso.js
index eab51f06c..8d70077ad 100644
--- a/test/lib/auth/sso.js
+++ b/test/lib/auth/sso.js
@@ -1,7 +1,6 @@
const t = require('tap')
let log = ''
-let warn = ''
const _flatOptions = {
ssoType: 'oauth',
@@ -15,9 +14,6 @@ const sso = t.mock('../../../lib/auth/sso.js', {
info: (...msgs) => {
log += msgs.join(' ') + '\n'
},
- warn: (...msgs) => {
- warn += msgs.join(' ')
- },
},
'npm-profile': profile,
'npm-registry-fetch': npmFetch,
@@ -44,15 +40,8 @@ t.test('empty login', async (t) => {
'should throw if no sso-type defined in flatOptions'
)
- t.equal(
- warn,
- 'deprecated SSO --auth-type is deprecated',
- 'should print deprecation warning'
- )
-
_flatOptions.ssoType = 'oauth'
log = ''
- warn = ''
})
t.test('simple login', async (t) => {
@@ -104,7 +93,6 @@ t.test('simple login', async (t) => {
)
log = ''
- warn = ''
delete profile.loginCouch
delete npmFetch.json
})
@@ -151,7 +139,6 @@ t.test('polling retry', async (t) => {
})
log = ''
- warn = ''
delete profile.loginCouch
delete npmFetch.json
})
@@ -174,7 +161,6 @@ t.test('polling error', async (t) => {
)
log = ''
- warn = ''
delete profile.loginCouch
delete npmFetch.json
})
@@ -193,7 +179,6 @@ t.test('no token retrieved from loginCouch', async (t) => {
)
log = ''
- warn = ''
delete profile.loginCouch
})
@@ -211,7 +196,6 @@ t.test('no sso url retrieved from loginCouch', async (t) => {
)
log = ''
- warn = ''
delete profile.loginCouch
})
@@ -247,7 +231,6 @@ t.test('scoped login', async (t) => {
)
log = ''
- warn = ''
delete profile.loginCouch
delete npmFetch.json
})
diff --git a/test/lib/commands/install.js b/test/lib/commands/install.js
index d5db3af67..afb6adb4f 100644
--- a/test/lib/commands/install.js
+++ b/test/lib/commands/install.js
@@ -12,7 +12,7 @@ t.test('with args, dev=true', async t => {
let REIFY_CALLED = false
let ARB_OBJ = null
- const { npm, logs } = await loadMockNpm(t, {
+ const { npm } = await loadMockNpm(t, {
'@npmcli/run-script': ({ event }) => {
SCRIPTS.push(event)
},
@@ -41,10 +41,7 @@ t.test('with args, dev=true', async t => {
npm.prefix = path.resolve(t.testdir({}))
await npm.exec('install', ['fizzbuzz'])
- t.match(
- logs.warn,
- [['install', 'Usage of the `--dev` option is deprecated. Use `--include=dev` instead.']]
- )
+
t.match(
ARB_ARGS,
{ global: false, path: npm.prefix, auditLevel: null },