scripts: switch to failing to classification tests
This commit is contained in:
parent
62b6a407a6
commit
576fbbfff5
1 changed files with 7 additions and 7 deletions
|
@ -10,11 +10,11 @@ var fixtures2 = require('./fixtures/scripts.json')
|
||||||
|
|
||||||
describe('Scripts', function() {
|
describe('Scripts', function() {
|
||||||
describe('classifyInput', function() {
|
describe('classifyInput', function() {
|
||||||
fixtures.valid.forEach(function(f) {
|
fixtures2.valid.forEach(function(f) {
|
||||||
if (f.scriptPubKey) return
|
if (!f.scriptSig) return
|
||||||
|
|
||||||
it('supports ' + f.type, function() {
|
it('classifies ' + f.scriptSig + ' as ' + f.type, function() {
|
||||||
var script = Script.fromHex(f.hex)
|
var script = Script.fromHex(f.scriptSig)
|
||||||
var type = scripts.classifyInput(script)
|
var type = scripts.classifyInput(script)
|
||||||
|
|
||||||
assert.equal(type, f.type)
|
assert.equal(type, f.type)
|
||||||
|
@ -23,11 +23,11 @@ describe('Scripts', function() {
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('classifyOutput', function() {
|
describe('classifyOutput', function() {
|
||||||
fixtures.valid.forEach(function(f) {
|
fixtures2.valid.forEach(function(f) {
|
||||||
if (!f.scriptPubKey) return
|
if (!f.scriptPubKey) return
|
||||||
|
|
||||||
it('supports ' + f.type, function() {
|
it('classifies ' + f.scriptPubKey + ' as ' + f.type, function() {
|
||||||
var script = Script.fromHex(f.hex)
|
var script = Script.fromHex(f.scriptPubKey)
|
||||||
var type = scripts.classifyOutput(script)
|
var type = scripts.classifyOutput(script)
|
||||||
|
|
||||||
assert.equal(type, f.type)
|
assert.equal(type, f.type)
|
||||||
|
|
Loading…
Reference in a new issue