UNPKG

450 BJavaScriptView Raw
1/**
2 * Verify environment:
3 * - Runs on Travis
4 * - Has a Github authentication token
5 * - Runs on after_success step (TRAVIS_TEST_RESULT is set)
6 *
7 * @param {String} githubToken Github authentication token
8 * @throws {Error} if one of the verification fails
9 */
10module.exports = githubToken => {
11 if (process.env.TRAVIS !== 'true') throw new Error('Not running on Travis');
12 if (!githubToken) throw new Error('GitHub authentication missing');
13};