diff options
author | Rebecca Turner <me@re-becca.org> | 2017-09-28 21:30:14 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2017-10-04 11:08:25 +0300 |
commit | f97ad6a38412581d059108ea29be470acb4fa510 (patch) | |
tree | ec8cdcfe00e717a90d6f7670bc53272bf8100b3d /test | |
parent | f6ebf5e8bd6a212c7661e248c62c423f2b54d978 (diff) |
auth/legacy: Use new profile lib for login
Diffstat (limited to 'test')
-rw-r--r-- | test/tap/adduser-legacy-auth.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/tap/adduser-legacy-auth.js b/test/tap/adduser-legacy-auth.js index 1fc1210ed..67292cf06 100644 --- a/test/tap/adduser-legacy-auth.js +++ b/test/tap/adduser-legacy-auth.js @@ -56,14 +56,14 @@ test('npm login', function (t) { [ 'login', '--registry', common.registry, - '--loglevel', 'silent', + '--loglevel', 'error', '--userconfig', outfile ], opts, function (err, code, stdout, stderr) { - t.ifError(err, 'npm ran without issue') - t.notOk(code, 'exited OK') - t.notOk(stderr, 'no error output') + if (err) throw err + t.is(code, 0, 'exited OK') + t.is(stderr, '', 'no error output') var config = fs.readFileSync(outfile, 'utf8') t.like(config, /:always-auth=false/, 'always-auth is scoped and false (by default)') s.close() @@ -80,7 +80,7 @@ test('npm login', function (t) { remaining-- var label = chunk.toString('utf8').split(':')[0] - runner.stdin.write(responses[label]) + if (responses[label]) runner.stdin.write(responses[label]) if (remaining === 0) runner.stdin.end() } else { |