TxBuilder: add more failing cases and error handling
This commit is contained in:
parent
e1479b6fa5
commit
1d0fd3e9a4
3 changed files with 25 additions and 1 deletions
|
@ -256,6 +256,16 @@ describe('TransactionBuilder', function() {
|
|||
})
|
||||
})
|
||||
|
||||
fixtures.invalid.fromTransaction.forEach(function(f,i) {
|
||||
it('throws on ' + f.exception, function() {
|
||||
var tx = Transaction.fromHex(f.hex)
|
||||
|
||||
assert.throws(function() {
|
||||
TransactionBuilder.fromTransaction(tx)
|
||||
}, new RegExp(f.exception))
|
||||
})
|
||||
})
|
||||
|
||||
it('works for the P2SH multisig case', function() {
|
||||
var privKeys = [
|
||||
"91avARGdfge8E4tZfYLoxeJ5sGBdNJQH4kvjJoQFacbgwmaKkrx",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue