Skip to content

Commit

Permalink
add unit test for historical ledger retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
Mwni committed Nov 4, 2023
1 parent 06256ff commit 87bc09f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/unit/xrpl.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,24 @@ describe(
pool.close()
}
).timeout(10000)

it(
'should retrieve a historical ledger from a node that has it',
async () => {
let pool = createPool([
{ url: 'wss://s1.ripple.com' },
{ url: 'wss://s2.ripple.com' },
])

let { result } = await pool.request({
command: 'ledger',
ledger_index: 32570
})

expect(result.ledger.ledger_hash).to.be.equal('4109C6F2045FC7EFF4CDE8F9905D19C28820D86304080FF886B299F0206E42B5')

pool.close()
}
).timeout(10000)
}
)

0 comments on commit 87bc09f

Please sign in to comment.