chore: rename test files (#2181)

This commit is contained in:
justinr1234
2023-01-06 14:04:36 -06:00
committed by GitHub
parent 9e74f94c44
commit 8abcfe4640
122 changed files with 49 additions and 50 deletions

View File

@@ -0,0 +1,36 @@
import { assert } from 'chai'
import _ from 'lodash'
import { LedgerCurrentResponse, LedgerCurrentRequest } from 'xrpl-local'
import serverUrl from '../serverUrl'
import { setupClient, teardownClient } from '../setup'
// how long before each test case times out
const TIMEOUT = 20000
describe('ledger_current', function () {
this.timeout(TIMEOUT)
beforeEach(_.partial(setupClient, serverUrl))
afterEach(teardownClient)
it('base', async function () {
const ledgerCurrentRequest: LedgerCurrentRequest = {
command: 'ledger_current',
}
const ledgerCurrentResponse = await this.client.request(
ledgerCurrentRequest,
)
const expectedResponse: LedgerCurrentResponse = {
id: ledgerCurrentResponse.id,
type: 'response',
result: {
ledger_current_index: 1,
},
}
assert.equal(ledgerCurrentResponse.type, expectedResponse.type)
assert.typeOf(ledgerCurrentResponse.result.ledger_current_index, 'number')
})
})