Skip to content

Commit

Permalink
Add some coverage skips for code paths only run in the real cli
Browse files Browse the repository at this point in the history
  • Loading branch information
Dom Harrington committed Oct 1, 2018
1 parent 64153ba commit 65fde12
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const configStore = require('../lib/configstore');

const testing = process.env.NODE_ENV === 'testing';

/* istanbul ignore next */
async function getCredentials(opts) {
return {
email: await read({ prompt: 'Email:', default: configStore.get('email') }),
Expand All @@ -25,6 +26,7 @@ exports.run = async function({ opts }) {
let { email, password, project } = opts;

// We only want to prompt for input outside of the test environment
/* istanbul ignore next */
if (!testing) {
({ email, password, project } = await getCredentials(opts));
}
Expand Down

0 comments on commit 65fde12

Please sign in to comment.