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:
authorGar <gar+gh@danger.computer>2021-03-01 06:00:58 +0300
committerGar <gar+gh@danger.computer>2021-03-09 22:10:06 +0300
commit85a8694dd9b4a924a474ba75261914511a216868 (patch)
tree1102b6d0df598a59bd85998a2f05f155ba6b1800 /test/lib/init.js
parent7ff152d94d2dbeaacbfc9824d8b1bb6ff96bf0f2 (diff)
fix(npm.output): make output go through npm.output
All output that anything wants to make now goes through `npm.output()`. This is an incremental change getting us closer to where we want to be with testing. PR-URL: https://github.com/npm/cli/pull/2795 Credit: @wraithgar Close: #2795 Reviewed-by: @ruyadorno, @isaacs
Diffstat (limited to 'test/lib/init.js')
-rw-r--r--test/lib/init.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/lib/init.js b/test/lib/init.js
index db5411ba7..8b9f32e15 100644
--- a/test/lib/init.js
+++ b/test/lib/init.js
@@ -14,13 +14,13 @@ const npm = {
config: { set () {} },
flatOptions: {},
log: npmLog,
+ output: (...msg) => {
+ result += msg.join('\n')
+ },
}
const mocks = {
'init-package-json': (dir, initFile, config, cb) => cb(null, 'data'),
'../../lib/utils/usage.js': () => 'usage instructions',
- '../../lib/utils/output.js': (...msg) => {
- result += msg.join('\n')
- },
}
const Init = requireInject('../../lib/init.js', mocks)
const init = new Init(npm)