diff --git a/test/GitHubInfo.spec.js b/test/GitHubInfo.spec.js index dbf49a92..7969e6d8 100644 --- a/test/GitHubInfo.spec.js +++ b/test/GitHubInfo.spec.js @@ -1,13 +1,6 @@ import { assert } from 'chai'; import GitHubInfo from '../lib/src/GitHubInfo'; -const TOKEN = process.env.GREN_GITHUB_TOKEN; - -if (!TOKEN) { - console.log(chalk.blue('Token not present, skipping Gren tests.')); - describe = describe.skip; -} - describe('GitHubInfo', () => { let githubInfo; @@ -27,7 +20,7 @@ describe('GitHubInfo', () => { assert.deepEqual(repo, 'github-release-notes', 'Get the repository name from repo\'s folder'); }); - if (TOKEN) { + if (process.env.GREN_GITHUB_TOKEN) { githubInfo.token.then(({ token }) => { assert.isOk(token); }); @@ -37,9 +30,10 @@ describe('GitHubInfo', () => { assert.isOk(options[0].repo); assert.isOk(options[0].username); - if (TOKEN) { + if (process.env.GREN_GITHUB_TOKEN) { assert.isOk(options[1].token); } }); + }); -}); +})