mirror of
https://github.com/Xahau/xahau.js.git
synced 2026-04-29 15:37:50 +00:00
refactor: move hasNextPage from Client to utils (#1715)
* add hasNextPage * remove unused util * add tests * remove hasNextPage from client
This commit is contained in:
@@ -2,7 +2,7 @@ import { assert } from 'chai'
|
||||
|
||||
import { deriveXAddress } from 'xrpl-local'
|
||||
|
||||
describe('client.deriveXAddress', function () {
|
||||
describe('deriveXAddress', function () {
|
||||
it('returns address for public key', function () {
|
||||
assert.equal(
|
||||
deriveXAddress({
|
||||
|
||||
17
test/utils/hasNextPage.ts
Normal file
17
test/utils/hasNextPage.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { assert } from 'chai'
|
||||
|
||||
import { hasNextPage } from 'xrpl-local'
|
||||
|
||||
import fixtures from '../fixtures/rippled'
|
||||
|
||||
describe('hasNextPage', function () {
|
||||
it('returns true when response has marker', function () {
|
||||
const firstPage = fixtures.ledger_data.first_page
|
||||
assert.isTrue(hasNextPage(firstPage))
|
||||
})
|
||||
|
||||
it('returns false when response does not have marker', function () {
|
||||
const lastPage = fixtures.ledger_data.last_page
|
||||
assert.isFalse(hasNextPage(lastPage))
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user