tests: test non-standard pathway for classifyInput
This commit is contained in:
parent
ddb24ee615
commit
f3138dcb68
2 changed files with 17 additions and 0 deletions
test
|
@ -19,6 +19,17 @@ describe('Scripts', function() {
|
|||
assert.equal(type, f.type)
|
||||
})
|
||||
})
|
||||
|
||||
fixtures.invalid.classify.forEach(function(f) {
|
||||
if (!f.scriptSig) return
|
||||
|
||||
it('returns nonstandard for ' + f.description, function() {
|
||||
var script = Script.fromASM(f.scriptSig)
|
||||
var type = scripts.classifyInput(script)
|
||||
|
||||
assert.equal(type, 'nonstandard')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('classifyOutput', function() {
|
||||
|
@ -34,6 +45,8 @@ describe('Scripts', function() {
|
|||
})
|
||||
|
||||
fixtures.invalid.classify.forEach(function(f) {
|
||||
if (!f.scriptPubKey) return
|
||||
|
||||
it('returns nonstandard for ' + f.description, function() {
|
||||
var script = Script.fromASM(f.scriptPubKey)
|
||||
var type = scripts.classifyOutput(script)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue