From 09a6c37430c76eb90a583f6e164dc6f98e7daee3 Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Thu, 4 Jul 2019 17:00:20 +0700 Subject: [PATCH] Test setVersion --- test/psbt.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/psbt.js b/test/psbt.js index 290c5e5..0f9a2f8 100644 --- a/test/psbt.js +++ b/test/psbt.js @@ -178,4 +178,14 @@ describe(`Psbt`, () => { }) }) }) + + describe('setVersion', () => { + it('Sets the version value of the unsigned transaction', () => { + const psbt = new Psbt() + + assert.strictEqual(psbt.extractTransaction().version, 2) + psbt.setVersion(1) + assert.strictEqual(psbt.extractTransaction().version, 1) + }) + }) })