fix(tests): Updated unit and integration tests

This commit is contained in:
Chris Troutner
2021-01-07 17:44:04 -08:00
parent 6926bbe113
commit 3ceebc1f12
5 changed files with 29 additions and 10 deletions
+2 -2
View File
@@ -743,8 +743,8 @@ describe('#SLP', () => {
const tokenUtxos = [
{
tokenId:
'0a321bff9761f28e06a268b14711274bb77617410a16807bd0437ef234a072b1',
decimals: 0,
'38e97c5d7d3585a2cbf3f9580c82ca33985f9cb0845d4dcce220cb709f9538b0',
decimals: 8,
tokenQty: 2
}
]
+19
View File
@@ -1178,6 +1178,25 @@ describe('#SLP TokenType1', () => {
})
})
describe('#generateSendOpReturn07', () => {
it('should generate send OP_RETURN code', () => {
// Mock UTXO.
const tokenUtxos = [
{
tokenId: '38e97c5d7d3585a2cbf3f9580c82ca33985f9cb0845d4dcce220cb709f9538b0',
decimals: 8,
tokenQty: 2
}
]
const result = bchjs.SLP.TokenType1.generateSendOpReturn(tokenUtxos, 1.5)
// console.log(`result: ${JSON.stringify(result, null, 2)}`)
assert.hasAllKeys(result, ['script', 'outputs'])
assert.isNumber(result.outputs)
})
})
describe('#generateBurnOpReturn', () => {
it('should generate burn OP_RETURN code', () => {
// Mock UTXO.