Skip to content

Commit b689fd1

Browse files
committed
test skeleton
1 parent 1a404d4 commit b689fd1

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

test/lib/PeerSync.js

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,30 @@
22
var assert = require('assert');
33
var PeerSync = require('../../lib/PeerSync.js').class();
44
describe('Unit testing PeerSync', function() {
5-
var ps = new PeerSync();
5+
var ps;
6+
beforeEach(function() {
7+
ps = new PeerSync();
8+
});
69
describe('#init()', function() {
710
it('should return with no errors', function() {
8-
assert.doesNotThrow(function(){
11+
assert.doesNotThrow(function() {
912
ps.init();
1013
});
1114
});
1215
});
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+
});
1330
});
1431

0 commit comments

Comments
 (0)