From b689fd1c513ed2020dd5373349da47dc3d792925 Mon Sep 17 00:00:00 2001 From: Manuel Araoz Date: Thu, 16 Jan 2014 13:01:10 -0300 Subject: [PATCH] test skeleton --- test/lib/PeerSync.js | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/test/lib/PeerSync.js b/test/lib/PeerSync.js index de6b49be..230a02fd 100644 --- a/test/lib/PeerSync.js +++ b/test/lib/PeerSync.js @@ -2,13 +2,30 @@ var assert = require('assert'); var PeerSync = require('../../lib/PeerSync.js').class(); describe('Unit testing PeerSync', function() { - var ps = new PeerSync(); + var ps; + beforeEach(function() { + ps = new PeerSync(); + }); describe('#init()', function() { it('should return with no errors', function() { - assert.doesNotThrow(function(){ + assert.doesNotThrow(function() { ps.init(); }); }); }); + 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'); + }); });