Add trustSet integration test and browser test (#1667)

This commit is contained in:
Jackson Mills
2021-09-24 13:47:27 -07:00
committed by Mayukha Vadari
parent da92bb7f1a
commit afe06451ac
2 changed files with 34 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ export * from './transactions/depositPreauth'
export * from './transactions/paymentChannelCreate'
export * from './transactions/paymentChannelClaim'
export * from './transactions/paymentChannelFund'
export * from './transactions/trustSet'
export * from './requests/accountChannels'
export * from './requests/accountCurrencies'

View File

@@ -0,0 +1,33 @@
import _ from 'lodash'
import { TrustSet } from 'xrpl-local'
import serverUrl from '../serverUrl'
import { setupClient, suiteClientSetup, teardownClient } from '../setup'
import { generateFundedWallet, testTransaction } from '../utils'
// how long before each test case times out
const TIMEOUT = 20000
describe('TrustSet', function () {
this.timeout(TIMEOUT)
before(suiteClientSetup)
beforeEach(_.partial(setupClient, serverUrl))
afterEach(teardownClient)
it('base', async function () {
const wallet2 = await generateFundedWallet(this.client)
const tx: TrustSet = {
TransactionType: 'TrustSet',
Account: this.wallet.getClassicAddress(),
LimitAmount: {
currency: 'USD',
issuer: wallet2.getClassicAddress(),
value: '100',
},
}
await testTransaction(this.client, tx, this.wallet)
})
})