FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
node-gitlab-legacy/tests/ApiBaseHTTP.test.js at develop · node-gitlab/node-gitlab-legacy · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
This repository was archived by the owner on Dec 26, 2019. It is now read-only.
node-gitlab
/
node-gitlab-legacy
Public archive
forked from
moul/node-gitlab
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
node-gitlab-legacy
/
tests
/
ApiBaseHTTP.test.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
44 lines (36 loc) · 1.23 KB
Breadcrumbs
node-gitlab-legacy
/
tests
/
ApiBaseHTTP.test.js
Copy path
File metadata and controls
44 lines (36 loc) · 1.23 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
(
function
(
)
{
var
chai
,
expect
,
proxyquire
,
sinon
,
sinonChai
;
chai
=
require
(
'chai'
)
;
expect
=
chai
.
expect
;
sinon
=
require
(
'sinon'
)
;
proxyquire
=
require
(
'proxyquire'
)
;
sinonChai
=
require
(
'sinon-chai'
)
;
chai
.
use
(
sinonChai
)
;
describe
(
"ApiBaseHTTP"
,
function
(
)
{
var
ApiBaseHTTP
,
apibasehttp
;
ApiBaseHTTP
=
null
;
apibasehttp
=
null
;
before
(
function
(
)
{
return
ApiBaseHTTP
=
require
(
'../lib/ApiBaseHTTP'
)
.
ApiBaseHTTP
;
}
)
;
beforeEach
(
function
(
)
{
}
)
;
return
describe
(
"handleOptions()"
,
function
(
)
{
it
(
"should strip /api/v3 from `url` parameter if provided"
,
function
(
)
{
apibasehttp
=
new
ApiBaseHTTP
(
{
base_url
:
"api/v3"
,
url
:
"http://gitlab.mydomain.com/api/v3"
,
token
:
"test"
}
)
;
return
expect
(
apibasehttp
.
options
.
url
)
.
to
.
equal
(
"http://gitlab.mydomain.com"
)
;
}
)
;
return
it
(
"should not strip /api/v3 from `url` parameter if not provided"
,
function
(
)
{
apibasehttp
=
new
ApiBaseHTTP
(
{
base_url
:
"api/v3"
,
url
:
"http://gitlab.mydomain.com"
,
token
:
"test"
}
)
;
return
expect
(
apibasehttp
.
options
.
url
)
.
to
.
equal
(
"http://gitlab.mydomain.com"
)
;
}
)
;
}
)
;
}
)
;
}
)
.
call
(
this
)
;
Back
|
FazBrowse Home
|
New Git URL