Add Ledger Method Integration Tests (#1640)

Add integration tests for ledger, ledgerEntry, ledgerData, ledgerClosed and ledgerCurrent, plus add them to the browser tests.
This commit is contained in:
Jackson Mills
2021-09-24 09:38:52 -07:00
committed by Mayukha Vadari
parent 5d67f14ea3
commit 297dee9b8f
9 changed files with 215 additions and 2 deletions

View File

@@ -2,7 +2,7 @@ import { assert } from 'chai'
import _ from 'lodash'
import { decode } from 'ripple-binary-codec'
import { Client, Wallet } from 'xrpl-local'
import { Client, Wallet, Response } from 'xrpl-local'
import { Payment, Transaction } from 'xrpl-local/models/transactions'
import { computeSignedTransactionHash } from 'xrpl-local/utils/hashes'
@@ -73,6 +73,11 @@ export async function verifySubmittedTransaction(
}
}
export function verifySuccessfulResponse(response: Response): void {
assert.equal(response.status, 'success')
assert.equal(response.type, 'response')
}
export async function testTransaction(
client: Client,
transaction: Transaction,