mirror of
https://github.com/Xahau/xahau.js.git
synced 2026-06-07 10:46:49 +00:00
* write getLedgerIndex * add to client * rename file * add tests * remove unused import * fix browser tests * respond to comments, more cleanup
16 lines
459 B
TypeScript
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)
|
|
})
|
|
})
|