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:
authorLuke Karrys <luke@lukekarrys.com>2022-03-31 03:43:18 +0300
committerGitHub <noreply@github.com>2022-03-31 03:43:18 +0300
commit668ec7f33b7a76f5e86a59f7e5a6c0e068a242b1 (patch)
tree2bb790d171d87c93e7ff5ff43e318e1db97575da /workspaces/arborist/test
parentff1367f01b9dd924d039b5a6b58399101cac99ca (diff)
fix: only call npmlog progress methods if explicitly requested (#4644)
Fixes #3314
Diffstat (limited to 'workspaces/arborist/test')
-rw-r--r--workspaces/arborist/test/tracker.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/workspaces/arborist/test/tracker.js b/workspaces/arborist/test/tracker.js
index 0c2fbb729..229663919 100644
--- a/workspaces/arborist/test/tracker.js
+++ b/workspaces/arborist/test/tracker.js
@@ -1,8 +1,8 @@
const Tracker = require('../lib/tracker.js')(class {})
const t = require('tap')
-t.test('no npmlog', t => {
- const tr = new Tracker()
+t.test('with progress', t => {
+ const tr = new Tracker({ progress: true })
t.doesNotThrow(() => {
tr.addTracker('testTracker')
})
@@ -10,6 +10,10 @@ t.test('no npmlog', t => {
tr.finishTracker('testTracker')
})
+ t.throws(() => {
+ tr.addTracker()
+ }, Error, `Tracker can't be null or undefined`)
+
t.end()
})