check that there is no inconsistency between docs and bitcore version
This commit is contained in:
parent
b23d0bc7c9
commit
3ebd615d4c
15
test/docs.js
15
test/docs.js
@ -1,18 +1,17 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
/* jshint maxstatements: 30 */
|
|
||||||
|
|
||||||
var chai = require('chai');
|
var chai = require('chai');
|
||||||
var should = chai.should();
|
var should = chai.should();
|
||||||
var expect = chai.expect;
|
|
||||||
|
|
||||||
var bitcore = require('..');
|
var bitcore = require('..');
|
||||||
|
var fs = require('fs');
|
||||||
|
|
||||||
describe('Address', function() {
|
describe('Documentation', function() {
|
||||||
|
|
||||||
it('should throw an error because of bad network param', function() {
|
it('major and minor versions should match', function() {
|
||||||
(function(){
|
var versionRE = /v[0-9]+\.[0-9]+/;
|
||||||
return new Address(PKHLivenet[0], 'main', 'pubkeyhash');
|
var docIndex = fs.readFileSync('./docs/index.md', 'ascii');
|
||||||
}).should.throw('Second argument must be "livenet" or "testnet".');
|
var docVersion = docIndex.match(versionRE)[0];
|
||||||
|
bitcore.version.indexOf(docVersion).should.equal(0);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user