mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 04:05:52 +00:00
test: SignerListSet transaction integration tests (#1621)
* add tests * clean up helper functions * fix account funding * remove unneeded method * use new wallets for each test * automatically fund wallets * fix TODO
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { generateXAddress, Client } from 'xrpl-local'
|
||||
import { generateXAddress, Client, Wallet } from 'xrpl-local'
|
||||
|
||||
import serverUrl from './serverUrl'
|
||||
import { ledgerAccept } from './utils'
|
||||
import { fundAccount, ledgerAccept } from './utils'
|
||||
|
||||
export async function teardownClient(this: Mocha.Context): Promise<void> {
|
||||
this.client.disconnect()
|
||||
@@ -29,8 +29,15 @@ export async function setupClient(
|
||||
this: Mocha.Context,
|
||||
server = serverUrl,
|
||||
): Promise<void> {
|
||||
this.wallet = Wallet.generate()
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
this.client = new Client(server)
|
||||
this.client.connect().then(resolve).catch(reject)
|
||||
this.client
|
||||
.connect()
|
||||
.then(async () => {
|
||||
await fundAccount(this.client, this.wallet)
|
||||
resolve()
|
||||
})
|
||||
.catch(reject)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user