FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
bitcore/test/test.PeerManager.js at master · deckar01/bitcore · GitHub
deckar01
bitcore
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
bitcore
/
test
/
test.PeerManager.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
48 lines (38 loc) · 1.09 KB
Breadcrumbs
bitcore
/
test
/
test.PeerManager.js
Copy path
File metadata and controls
48 lines (38 loc) · 1.09 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
'use strict'
;
var
chai
=
chai
||
require
(
'chai'
)
;
var
bitcore
=
bitcore
||
require
(
'../bitcore'
)
;
var
should
=
chai
.
should
(
)
;
var
PeerManagerModule
=
bitcore
.
PeerManager
;
var
PeerManager
;
describe
(
'PeerManager'
,
function
(
)
{
it
(
'should initialze the main object'
,
function
(
)
{
should
.
exist
(
PeerManagerModule
)
;
}
)
;
it
(
'should be able to create class'
,
function
(
)
{
PeerManager
=
PeerManagerModule
;
should
.
exist
(
PeerManager
)
;
}
)
;
it
(
'should be able to create instance'
,
function
(
)
{
var
pm
=
new
PeerManager
(
)
;
should
.
exist
(
pm
)
;
}
)
;
it
(
'should be able to start instance'
,
function
(
)
{
var
pm
=
new
PeerManager
(
)
;
pm
.
start
.
bind
(
pm
)
.
should
.
not
.
throw
(
)
;
}
)
;
it
(
'should be able to stop instance'
,
function
(
)
{
var
pm
=
new
PeerManager
(
)
;
pm
.
start
(
)
;
pm
.
stop
.
bind
(
pm
)
.
should
.
not
.
throw
(
)
;
}
)
;
it
(
'should extend default config with passed config'
,
function
(
)
{
var
pm
=
new
PeerManager
(
{
proxy
:
{
host
:
'localhost'
,
port
:
9050
}
}
)
;
should
.
exist
(
pm
.
config
.
network
)
;
should
.
exist
(
pm
.
config
.
proxy
)
;
}
)
;
}
)
;
Back
|
FazBrowse Home
|
New Git URL