2014-01-15 07:53:44 -08:00
|
|
|
'use strict';
|
|
|
|
var assert = require('assert');
|
|
|
|
var PeerSync = require('../../lib/PeerSync.js').class();
|
|
|
|
describe('Unit testing PeerSync', function() {
|
2014-01-16 08:01:10 -08:00
|
|
|
var ps;
|
|
|
|
beforeEach(function() {
|
|
|
|
ps = new PeerSync();
|
|
|
|
});
|
2014-01-15 07:53:44 -08:00
|
|
|
describe('#init()', function() {
|
|
|
|
it('should return with no errors', function() {
|
2014-01-16 08:01:10 -08:00
|
|
|
assert.doesNotThrow(function() {
|
2014-01-15 07:53:44 -08:00
|
|
|
ps.init();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
2014-01-16 08:01:10 -08:00
|
|
|
describe('#handle_inv()', function() {
|
|
|
|
it('should return with no errors');
|
|
|
|
it('should call sendGetData');
|
|
|
|
});
|
|
|
|
describe('#handle_tx()', function() {
|
|
|
|
it('should call storeTxs');
|
|
|
|
});
|
|
|
|
describe('#handle_block()', function() {
|
|
|
|
it('should call storeBlock');
|
|
|
|
it('should call storeTxs for each transaction');
|
|
|
|
});
|
|
|
|
describe('#run()', function() {
|
|
|
|
it('should setup peerman');
|
|
|
|
});
|
2014-01-15 07:53:44 -08:00
|
|
|
});
|
|
|
|
|