From 03dc569236fc1b14293048feb827a0c1a629a40d Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Mon, 14 Nov 2016 16:13:21 +1100 Subject: [PATCH] tests: add test for setWitness --- test/transaction.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/transaction.js b/test/transaction.js index 4048245..bf00111 100644 --- a/test/transaction.js +++ b/test/transaction.js @@ -225,4 +225,12 @@ describe('Transaction', function () { }) }) }) + + describe('setWitness', function () { + it('only accepts a a witness stack (Array of Buffers)', function () { + assert.throws(function () { + (new Transaction()).setWitness(0, 'foobar') + }, /Expected property "1" of type \[Buffer\], got String "foobar"/) + }) + }) })