bitcore/test/networks.js

25 lines
667 B
JavaScript
Raw Normal View History

2014-11-20 13:08:31 -08:00
'use strict';
var should = require('chai').should();
2014-11-21 07:54:56 -08:00
var bitcore = require('..');
var networks = bitcore.Networks;
2014-11-20 13:08:31 -08:00
2014-11-21 08:26:30 -08:00
describe('Networks', function() {
2014-11-20 13:08:31 -08:00
2014-11-21 08:26:30 -08:00
it('should contain all Networks', function() {
should.exist(networks.livenet);
should.exist(networks.testnet);
should.exist(networks.defaultNetwork);
2014-11-21 07:54:56 -08:00
});
var constants = ['name', 'alias', 'pubkeyhash', 'scripthash', 'xpubkey', 'xprivkey'];
constants.forEach(function(key){
it('should have constant '+key+' for livenet and testnet', function(){
networks.testnet.hasOwnProperty(key).should.equal(true);
networks.livenet.hasOwnProperty(key).should.equal(true);
});
2014-11-20 13:08:31 -08:00
});
});