bitcore-lib-zcash/test/test.PeerManager.js

43 lines
961 B
JavaScript
Raw Normal View History

2014-02-19 11:07:50 -08:00
'use strict';
var chai = chai || require('chai');
var bitcore = bitcore || require('../bitcore');
2014-02-19 11:07:50 -08:00
var should = chai.should();
2014-07-19 08:21:22 -07:00
var PeerManager = bitcore.PeerManager;
2014-02-19 11:07:50 -08:00
describe('PeerManager', function() {
it('should be able to create class', function() {
should.exist(PeerManager);
});
it('should be able to create instance', function() {
var pm = new PeerManager();
should.exist(pm);
});
it('should be able to start instance', function() {
var pm = new PeerManager();
pm.start.bind(pm).should.not.throw();
});
it('should be able to stop instance', function() {
var pm = new PeerManager();
pm.start();
pm.stop.bind(pm).should.not.throw();
});
2014-04-28 09:33:34 -07:00
it('should extend default config with passed config', function() {
var pm = new PeerManager({
proxy: {
host: 'localhost',
port: 9050
}
});
should.exist(pm.config.network);
should.exist(pm.config.proxy);
});
2014-02-19 11:07:50 -08:00
});