Skip to content

Commit

Permalink
dotenv
Browse files Browse the repository at this point in the history
  • Loading branch information
radiovisual committed Jun 1, 2016
1 parent 951bec0 commit 5190422
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ export default class Birdwatch {
throw new Error('You must supply at least one feed to Birdwatch');
}

// ensure we have Twitter Credentials via environment variables
if (!process.env.CONSUMER_KEY || !process.env.CONSUMER_SECRET || !process.env.ACCESS_TOKEN || !process.env.ACCESS_TOKEN_SECRET) {
// ensure we have Twitter Credentials via environment variables when not using testData
if (!self.options.testData && !process.env.CONSUMER_KEY || !process.env.CONSUMER_SECRET || !process.env.ACCESS_TOKEN || !process.env.ACCESS_TOKEN_SECRET) {
throw new Error('Twitter credentials must be set via environment variables. See README.md for setup information.');
}

Expand Down
1 change: 1 addition & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,4 @@ test('saves to cache file', async t => {
t.is(tweets.length, 5);
});
});

0 comments on commit 5190422

Please sign in to comment.