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:
authornlf <quitlahok@gmail.com>2020-12-18 20:15:15 +0300
committerisaacs <i@izs.me>2020-12-18 23:05:54 +0300
commit7539504e3abdec28039a7798e5ccb745b536cb6e (patch)
treed402304e8eaebc5521194cf927c07912178661fe /test/lib/utils
parent0ad958fe1cb811699caca235f361c8328baac8c4 (diff)
remove the metrics sendernlf/remove-metrics
PR-URL: https://github.com/npm/cli/pull/2382 Credit: @nlf Close: #2382 Reviewed-by: @isaacs
Diffstat (limited to 'test/lib/utils')
-rw-r--r--test/lib/utils/error-handler.js5
-rw-r--r--test/lib/utils/flat-options.js5
2 files changed, 0 insertions, 10 deletions
diff --git a/test/lib/utils/error-handler.js b/test/lib/utils/error-handler.js
index 2dc116a4d..0b896fee4 100644
--- a/test/lib/utils/error-handler.js
+++ b/test/lib/utils/error-handler.js
@@ -78,10 +78,6 @@ const npmlog = {
},
}
-const metrics = {
- stop: () => null,
-}
-
// overrides OS type/release for cross platform snapshots
const os = require('os')
os.type = () => 'Foo'
@@ -124,7 +120,6 @@ const mocks = {
summary: [['ERR', err.message]],
detail: [['ERR', err.message]],
}),
- '../../../lib/utils/metrics.js': metrics,
'../../../lib/utils/cache-file.js': cacheFile,
}
diff --git a/test/lib/utils/flat-options.js b/test/lib/utils/flat-options.js
index ee7620fa7..6f580fabc 100644
--- a/test/lib/utils/flat-options.js
+++ b/test/lib/utils/flat-options.js
@@ -34,8 +34,6 @@ class MockConfig {
cache: 'cache',
'node-version': '1.2.3',
global: 'global',
- 'metrics-registry': 'metrics-registry',
- 'send-metrics': 'send-metrics',
registry: 'registry',
access: 'access',
'always-auth': 'always-auth',
@@ -299,15 +297,12 @@ t.test('various default values and falsey fallbacks', t => {
const npm = new Mocknpm({
'script-shell': false,
registry: 'http://example.com',
- 'metrics-registry': null,
searchlimit: 0,
'save-exact': false,
'save-prefix': '>=',
})
const opts = flatOptions(npm)
t.equal(opts.scriptShell, undefined, 'scriptShell is undefined if falsey')
- t.equal(opts.metricsRegistry, 'http://example.com',
- 'metricsRegistry defaults to registry')
t.equal(opts.search.limit, 20, 'searchLimit defaults to 20')
t.equal(opts.savePrefix, '>=', 'save-prefix respected if no save-exact')
t.equal(opts.scope, '', 'scope defaults to empty string')