Files
xahau.js/packages/xahau/test/client/getLedgerIndex.test.ts
Denis Angell 9544e1794e xahau-patch
2025-03-14 15:08:35 +01:00

24 lines
605 B
TypeScript

import { assert } from 'chai'
import xahaud from '../fixtures/xahaud'
import {
setupClient,
teardownClient,
type XrplTestContext,
} from '../setupClient'
describe('client.getLedgerIndex', function () {
let testContext: XrplTestContext
beforeEach(async () => {
testContext = await setupClient()
})
afterEach(async () => teardownClient(testContext))
it('getLedgerIndex', async function () {
testContext.mockRippled!.addResponse('ledger', xahaud.ledger.normal)
const ledgerIndex = await testContext.client.getLedgerIndex()
assert.strictEqual(ledgerIndex, 9038214)
})
})