You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/helpers/mock-gitlab.js
+16-12Lines changed: 16 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -4,19 +4,23 @@ import urlJoin from 'url-join';
4
4
/**
5
5
* Retun a `nock` object setup to respond to a GitLab authentication request. Other expectation and responses can be chained.
6
6
*
7
-
* @param {String} [gitlabToken=process.env.GL_TOKEN || process.env.GITLAB_TOKEN || 'GL_TOKEN'] The github token to return in the authentication response.
8
-
* @param {String} [gitlabUrl=process.env.GL_URL || process.env.GITLAB_URL || 'https://api.github.com'] The url on which to intercept http requests.
9
-
* @param {String} [gitlabApiPathPrefix=process.env.GL_PREFIX || process.env.GITLAB_PREFIX || ''] The GitHub Enterprise API prefix.
7
+
* @param {Object} [env={}] Environment variables.
8
+
* @param {String} [gitlabToken=env.GL_TOKEN || env.GITLAB_TOKEN || 'GL_TOKEN'] The github token to return in the authentication response.
9
+
* @param {String} [gitlabUrl=env.GL_URL || env.GITLAB_URL || 'https://api.github.com'] The url on which to intercept http requests.
10
+
* @param {String} [gitlabApiPathPrefix=env.GL_PREFIX || env.GITLAB_PREFIX || ''] The GitHub Enterprise API prefix.
10
11
* @return {Object} A `nock` object ready to respond to a github authentication request.
0 commit comments