mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-30 00:55:49 +00:00
Add trustSet integration test and browser test (#1667)
This commit is contained in:
committed by
Mayukha Vadari
parent
da92bb7f1a
commit
afe06451ac
@@ -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'
|
||||
|
||||
33
test/integration/transactions/trustSet.ts
Normal file
33
test/integration/transactions/trustSet.ts
Normal 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)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user