insight-bitcore-api
Version:
An open-source bitcoin blockchain API. The Insight API provides you with a convenient, powerful and simple way to query and broadcast data on the bitcoin network and build your own services with it.
44 lines (31 loc) • 843 B
JavaScript
;
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
var assert = require('assert'),
Status = require('../../app/models/Status');
describe('Status', function(){
it('getInfo', function(done) {
var d = new Status();
d.getInfo(function(err) {
if (err) done(err);
assert.equal('number', typeof d.info.difficulty);
done();
});
});
it('getDifficulty', function(done) {
var d = new Status();
d.getDifficulty(function(err) {
if (err) done(err);
assert.equal('number', typeof d.difficulty);
done();
});
});
it('getLastBlockHash', function(done) {
var d = new Status();
d.getLastBlockHash(function(err) {
if (err) done(err);
assert.equal('string', typeof d.lastblockhash);
done();
});
});
});