test: delete unused test helper file
This commit is contained in:
parent
ffe1062830
commit
cd69583746
@ -1,16 +0,0 @@
|
|||||||
import nock from 'nock';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Retun a `nock` object setup to respond to a github authentication request. Other expectation and responses can be chained.
|
|
||||||
*
|
|
||||||
* @param {String} [githubToken='GH_TOKEN'] The github token to return in the authentication response.
|
|
||||||
* @param {String} [githubUrl='https://api.github.com'] The url on which to intercept http requests.
|
|
||||||
* @return {Object} A `nock` object ready to respond to a github authentication request.
|
|
||||||
*/
|
|
||||||
export default function authenticate({
|
|
||||||
githubToken = 'GH_TOKEN',
|
|
||||||
githubUrl = 'https://api.github.com',
|
|
||||||
githubApiPathPrefix = '',
|
|
||||||
} = {}) {
|
|
||||||
return nock(`${githubUrl}/${githubApiPathPrefix}`, {reqheaders: {Authorization: `token ${githubToken}`}});
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user