run js-beautify on everything
...with two spaces. Command: js-beautify -s 2 -r [filename]
This commit is contained in:
parent
da445e7c69
commit
ea2e2d4e19
49 changed files with 859 additions and 682 deletions
|
|
@ -132,27 +132,48 @@ describe('Insight model', function() {
|
|||
cb([]);
|
||||
};
|
||||
|
||||
w.checkActivity(addresses, function(err, actives){
|
||||
w.checkActivity(addresses, function(err, actives) {
|
||||
console.log(err);
|
||||
actives.length.should.equal(addresses.length);
|
||||
actives.filter(function(i) { return i }).length.should.equal(0);
|
||||
actives.filter(function(i) {
|
||||
return i
|
||||
}).length.should.equal(0);
|
||||
done();
|
||||
});
|
||||
});
|
||||
it('#checkActivity for active addreses', function(done) {
|
||||
var w = new Insight();
|
||||
w.getTransactions = function(addresses, cb) {
|
||||
cb([
|
||||
{vin: [{ addr: '2NATQJnaQe2CUKLyhL1zdNkttJM1dUH9HaM'}], vout: []},
|
||||
{vin: [{ addr: '2NATQJnaQe2CUKLyhL1zdNkttJM1dUH9HaM'}], vout: []},
|
||||
{vin: [{ addr: '2N9D5bcCQ2bPWUDByQ6Qb5bMgMtgsk1rw3x'}], vout: []},
|
||||
{vin: [], vout: [{scriptPubKey: {addresses: ['2NFjCBFZSsxiwWAD7CKQ3hzWFtf9DcqTucY']}}]}
|
||||
]);
|
||||
cb([{
|
||||
vin: [{
|
||||
addr: '2NATQJnaQe2CUKLyhL1zdNkttJM1dUH9HaM'
|
||||
}],
|
||||
vout: []
|
||||
}, {
|
||||
vin: [{
|
||||
addr: '2NATQJnaQe2CUKLyhL1zdNkttJM1dUH9HaM'
|
||||
}],
|
||||
vout: []
|
||||
}, {
|
||||
vin: [{
|
||||
addr: '2N9D5bcCQ2bPWUDByQ6Qb5bMgMtgsk1rw3x'
|
||||
}],
|
||||
vout: []
|
||||
}, {
|
||||
vin: [],
|
||||
vout: [{
|
||||
scriptPubKey: {
|
||||
addresses: ['2NFjCBFZSsxiwWAD7CKQ3hzWFtf9DcqTucY']
|
||||
}
|
||||
}]
|
||||
}]);
|
||||
};
|
||||
|
||||
w.checkActivity(addresses, function(err, actives){
|
||||
w.checkActivity(addresses, function(err, actives) {
|
||||
actives.length.should.equal(addresses.length);
|
||||
actives.filter(function(i) { return i }).length.should.equal(3);
|
||||
actives.filter(function(i) {
|
||||
return i
|
||||
}).length.should.equal(3);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue