From 576fbbfff5e2d74d6ee287adfcff147f581ef17d Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Tue, 24 Jun 2014 17:31:55 +1000 Subject: [PATCH] scripts: switch to failing to classification tests --- test/scripts.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/scripts.js b/test/scripts.js index 31ec045..d6bc4b4 100644 --- a/test/scripts.js +++ b/test/scripts.js @@ -10,11 +10,11 @@ var fixtures2 = require('./fixtures/scripts.json') describe('Scripts', function() { describe('classifyInput', function() { - fixtures.valid.forEach(function(f) { - if (f.scriptPubKey) return + fixtures2.valid.forEach(function(f) { + if (!f.scriptSig) return - it('supports ' + f.type, function() { - var script = Script.fromHex(f.hex) + it('classifies ' + f.scriptSig + ' as ' + f.type, function() { + var script = Script.fromHex(f.scriptSig) var type = scripts.classifyInput(script) assert.equal(type, f.type) @@ -23,11 +23,11 @@ describe('Scripts', function() { }) describe('classifyOutput', function() { - fixtures.valid.forEach(function(f) { + fixtures2.valid.forEach(function(f) { if (!f.scriptPubKey) return - it('supports ' + f.type, function() { - var script = Script.fromHex(f.hex) + it('classifies ' + f.scriptPubKey + ' as ' + f.type, function() { + var script = Script.fromHex(f.scriptPubKey) var type = scripts.classifyOutput(script) assert.equal(type, f.type)