Rename __hasWitnesses -> hasWitnesses, and add tests
This commit is contained in:
parent
e92ac1d01b
commit
bec7f690ce
2 changed files with 12 additions and 4 deletions
test
|
@ -119,6 +119,14 @@ describe('Transaction', function () {
|
|||
})
|
||||
})
|
||||
|
||||
describe('hasWitnesses', function () {
|
||||
fixtures.valid.forEach(function (f) {
|
||||
it('detects if the transaction has witnesses: ' + (f.whex ? 'true' : 'false'), function () {
|
||||
assert.strictEqual(Transaction.fromHex(f.whex ? f.whex : f.hex).hasWitnesses(), !!f.whex)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('addInput', function () {
|
||||
var prevTxHash
|
||||
beforeEach(function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue