Add authorization header to GitHub API call when COMPOSER_TOKEN is set

This commit is contained in:
Shivam Mathur
2021-07-06 08:16:53 +05:30
parent c6b6dabbb9
commit 39491a0fba
3 changed files with 16 additions and 2 deletions

View File

@ -41,6 +41,10 @@ describe('Utils tests', () => {
expect(await utils.fetch('test_url')).toBe(
'{ "latest": "8.0", "5.x": "5.6", "url": "test_url" }'
);
process.env['COMPOSER_TOKEN'] = 'GITHUB_TOKEN';
expect(await utils.fetch('test_url')).toBe(
'{ "latest": "8.0", "5.x": "5.6", "url": "test_url" }'
);
});
it('checking parseVersion', async () => {