Files
xahau.js/packages/xrpl/test/client/getLedgerIndex.test.ts
2023-02-03 17:03:07 -06:00

24 lines
608 B
TypeScript

import { assert } from 'chai'
import rippled from '../fixtures/rippled'
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', rippled.ledger.normal)
const ledgerIndex = await testContext.client.getLedgerIndex()
assert.strictEqual(ledgerIndex, 9038214)
})
})