Files
xahau.js/test/integration/transactions/payment.ts
Mayukha Vadari dac8c27b49 test: integration tests for Payment (#1635)
* test payment

* use new helper function elsewhere

* remove unneeded comment
2021-10-04 14:10:13 -04:00

30 lines
809 B
TypeScript

import _ from 'lodash'
import { Payment } 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('Payment', function () {
this.timeout(TIMEOUT)
before(suiteClientSetup)
beforeEach(_.partial(setupClient, serverUrl))
afterEach(teardownClient)
it('base', async function () {
const wallet2 = await generateFundedWallet(this.client)
const tx: Payment = {
TransactionType: 'Payment',
Account: this.wallet.getClassicAddress(),
Destination: wallet2.getClassicAddress(),
Amount: '1000',
}
await testTransaction(this.client, tx, this.wallet)
})
})