mirror of
https://github.com/Permissionless-Software-Foundation/psf-memo.git
synced 2026-09-21 16:52:01 -07:00
30 lines
601 B
JavaScript
30 lines
601 B
JavaScript
import { assert } from 'chai'
|
|
import sinon from 'sinon'
|
|
import Transaction from '../../../src/adapters/transaction.js'
|
|
|
|
describe('#Transaction', () => {
|
|
let uut
|
|
let sandbox
|
|
|
|
beforeEach(() => {
|
|
sandbox = sinon.createSandbox()
|
|
uut = new Transaction()
|
|
})
|
|
|
|
afterEach(() => sandbox.restore())
|
|
|
|
it('should detect memo tx', async () => {
|
|
sandbox.stub(uut, 'getTxData').resolves({
|
|
vout: [{
|
|
scriptPubKey: {
|
|
hex: '6a026d020474657374'
|
|
}
|
|
}],
|
|
vin: []
|
|
})
|
|
|
|
const result = await uut.isMemoTx('testtx')
|
|
assert.equal(result, true)
|
|
})
|
|
})
|