From c839f0b8917babf706c12fc6d58adaba1209c436 Mon Sep 17 00:00:00 2001 From: Chris Troutner Date: Mon, 1 Mar 2021 08:19:16 -0800 Subject: [PATCH] fix(integration tests): Fixing broken ABC integration test --- test/integration/chains/bchn/slp.js | 25 +++++++++++++++++++++++++ test/integration/slp.js | 23 ----------------------- 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/test/integration/chains/bchn/slp.js b/test/integration/chains/bchn/slp.js index 14e270c..6c9760e 100644 --- a/test/integration/chains/bchn/slp.js +++ b/test/integration/chains/bchn/slp.js @@ -31,6 +31,31 @@ describe('#SLP', () => { }) describe('#util', () => { + describe('#decodeOpReturn', () => { + it('should decode a NFT Child transaction', async () => { + const txid = + 'eeddccc4d716f04157ea132ac93a48040fea34a6b57f3d8f0cccb7d1a731ab2b' + + const data = await bchjs.SLP.Utils.decodeOpReturn(txid) + // console.log(`data: ${JSON.stringify(data, null, 2)}`) + + assert.property(data, 'tokenType') + assert.property(data, 'txType') + assert.property(data, 'ticker') + assert.property(data, 'name') + assert.property(data, 'tokenId') + assert.property(data, 'documentUri') + assert.property(data, 'documentHash') + assert.property(data, 'decimals') + assert.property(data, 'mintBatonVout') + assert.property(data, 'qty') + + assert.equal(data.tokenType, 65) + assert.equal(data.mintBatonVout, 0) + assert.equal(data.qty, '1') + }) + }) + describe('#tokenUtxoDetails', () => { it('should handle a range of UTXO types', async () => { const utxos = [ diff --git a/test/integration/slp.js b/test/integration/slp.js index 1d8e8d3..1d4570b 100644 --- a/test/integration/slp.js +++ b/test/integration/slp.js @@ -228,29 +228,6 @@ describe('#SLP', () => { assert.include(err.message, 'amount string size not 8 bytes') } }) - - it('should decode a NFT Child transaction', async () => { - const txid = - 'eeddccc4d716f04157ea132ac93a48040fea34a6b57f3d8f0cccb7d1a731ab2b' - - const data = await bchjs.SLP.Utils.decodeOpReturn(txid) - // console.log(`data: ${JSON.stringify(data, null, 2)}`) - - assert.property(data, 'tokenType') - assert.property(data, 'txType') - assert.property(data, 'ticker') - assert.property(data, 'name') - assert.property(data, 'tokenId') - assert.property(data, 'documentUri') - assert.property(data, 'documentHash') - assert.property(data, 'decimals') - assert.property(data, 'mintBatonVout') - assert.property(data, 'qty') - - assert.equal(data.tokenType, 65) - assert.equal(data.mintBatonVout, 0) - assert.equal(data.qty, '1') - }) }) describe('#tokenUtxoDetails', () => {