bitcore/test/networks.js

25 lines
667 B
JavaScript

'use strict';
var should = require('chai').should();
var bitcore = require('..');
var networks = bitcore.Networks;
describe('Networks', function() {
it('should contain all Networks', function() {
should.exist(networks.livenet);
should.exist(networks.testnet);
should.exist(networks.defaultNetwork);
});
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);
});
});
});