diff options
Diffstat (limited to 'test/lib/commands/adduser.js')
-rw-r--r-- | test/lib/commands/adduser.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/lib/commands/adduser.js b/test/lib/commands/adduser.js index 71d79ea93..8a9358f9a 100644 --- a/test/lib/commands/adduser.js +++ b/test/lib/commands/adduser.js @@ -20,6 +20,13 @@ const authDummy = (npm, options) => { throw new Error('did not pass full flatOptions to auth function') } + if (!options.log) { + // A quick to test to make sure a log gets passed to auth + // XXX: should be refactored with change to real mock npm + // https://github.com/npm/statusboard/issues/411 + throw new Error('pass log to auth') + } + return Promise.resolve({ message: 'success', newCreds: { @@ -71,6 +78,8 @@ const AddUser = t.mock('../../../lib/commands/adduser.js', { npmlog: { clearProgress: () => null, disableProgress: () => null, + }, + 'proc-log': { notice: (_, msg) => { registryOutput = msg }, |