Files
xahau.js/test/client/getLedgerIndex.ts
Mayukha Vadari b522e703b4 feat: add client.getLedgerIndex (#1668)
* write getLedgerIndex

* add to client

* rename file

* add tests

* remove unused import

* fix browser tests

* respond to comments, more cleanup
2021-10-04 14:11:26 -04:00

16 lines
459 B
TypeScript

import { assert } from 'chai'
import rippled from '../fixtures/rippled'
import { setupClient, teardownClient } from '../setupClient'
describe('client.getLedgerIndex', function () {
beforeEach(setupClient)
afterEach(teardownClient)
it('getLedgerIndex', async function () {
this.mockRippled.addResponse('ledger', rippled.ledger.normal)
const ledgerIndex = await this.client.getLedgerIndex()
assert.strictEqual(ledgerIndex, 9038214)
})
})