|
|
@ -16,7 +16,7 @@ describe('PeerSync', function() { |
|
|
|
}); |
|
|
|
|
|
|
|
describe('#init()', function() { |
|
|
|
it('should return with no errors', function() { |
|
|
|
it.skip('should return with no errors', function() { |
|
|
|
var other_ps = new PeerSync(); |
|
|
|
expect(other_ps.init.bind(other_ps)).not.to.throw(Error); |
|
|
|
other_ps.close(); |
|
|
@ -28,12 +28,12 @@ describe('PeerSync', function() { |
|
|
|
message: {invs: []}, |
|
|
|
conn: {sendGetData: sinon.spy()} |
|
|
|
}; |
|
|
|
it('should return with no errors', function(){ |
|
|
|
it.skip('should return with no errors', function(){ |
|
|
|
expect(function() { |
|
|
|
ps.handle_inv(inv_info); |
|
|
|
}).not.to.throw(Error); |
|
|
|
}); |
|
|
|
it('should call sendGetData', function() { |
|
|
|
it.skip('should call sendGetData', function() { |
|
|
|
ps.handle_inv(inv_info); |
|
|
|
expect(inv_info.conn.sendGetData.calledTwice).to.be.ok; |
|
|
|
}); |
|
|
@ -44,7 +44,7 @@ describe('PeerSync', function() { |
|
|
|
message: { tx: {getStandardizedObject: function(){ |
|
|
|
return {hash: 'dac28b5c5e70c16942718f3a22438348c1b709e01d398795fce8fc455178b973'};}}} |
|
|
|
}; |
|
|
|
it('should call storeTxs', function(){ |
|
|
|
it.skip('should call storeTxs', function(){ |
|
|
|
var spy = sinon.spy(ps.sync, 'storeTxs'); |
|
|
|
ps.handle_tx(tx_info); |
|
|
|
expect(spy.calledOnce).to.be.ok; |
|
|
@ -57,7 +57,7 @@ describe('PeerSync', function() { |
|
|
|
return new Buffer('01234'); |
|
|
|
}, txs: [{hash: new Buffer('cabafeca')}, {hash: new Buffer('bacacafe')}]}} |
|
|
|
}; |
|
|
|
it('should call storeBlock', function(){ |
|
|
|
it.skip('should call storeBlock', function(){ |
|
|
|
var spy = sinon.spy(ps.sync, 'storeBlock'); |
|
|
|
ps.handle_block(block_info); |
|
|
|
expect(spy.calledOnce).to.be.ok; |
|
|
@ -65,7 +65,7 @@ describe('PeerSync', function() { |
|
|
|
}); |
|
|
|
|
|
|
|
describe('#run()', function() { |
|
|
|
it('should setup peerman', function() { |
|
|
|
it.skip('should setup peerman', function() { |
|
|
|
var startSpy = sinon.spy(ps.peerman, 'start'); |
|
|
|
var onSpy = sinon.spy(ps.peerman, 'on'); |
|
|
|
ps.run(); |
|
|
|