File tree 1 file changed +19
-2
lines changed
1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change 2
2
var assert = require ( 'assert' ) ;
3
3
var PeerSync = require ( '../../lib/PeerSync.js' ) . class ( ) ;
4
4
describe ( 'Unit testing PeerSync' , function ( ) {
5
- var ps = new PeerSync ( ) ;
5
+ var ps ;
6
+ beforeEach ( function ( ) {
7
+ ps = new PeerSync ( ) ;
8
+ } ) ;
6
9
describe ( '#init()' , function ( ) {
7
10
it ( 'should return with no errors' , function ( ) {
8
- assert . doesNotThrow ( function ( ) {
11
+ assert . doesNotThrow ( function ( ) {
9
12
ps . init ( ) ;
10
13
} ) ;
11
14
} ) ;
12
15
} ) ;
16
+ describe ( '#handle_inv()' , function ( ) {
17
+ it ( 'should return with no errors' ) ;
18
+ it ( 'should call sendGetData' ) ;
19
+ } ) ;
20
+ describe ( '#handle_tx()' , function ( ) {
21
+ it ( 'should call storeTxs' ) ;
22
+ } ) ;
23
+ describe ( '#handle_block()' , function ( ) {
24
+ it ( 'should call storeBlock' ) ;
25
+ it ( 'should call storeTxs for each transaction' ) ;
26
+ } ) ;
27
+ describe ( '#run()' , function ( ) {
28
+ it ( 'should setup peerman' ) ;
29
+ } ) ;
13
30
} ) ;
14
31
You can’t perform that action at this time.
0 commit comments