add ledger to connection

This commit is contained in:
Fred K. Schott
2019-12-17 10:42:01 -08:00
parent f5196389e8
commit fc524894c6
2 changed files with 94 additions and 45 deletions

View File

@@ -79,6 +79,25 @@ describe('Connection', function() {
})
})
it('ledger methods work as expected', async function() {
assert.strictEqual(await this.api.connection.getLedgerVersion(), 8819951)
assert.strictEqual(
await this.api.connection.hasLedgerVersion(8819951),
true
)
assert.strictEqual(
await this.api.connection.hasLedgerVersions(8819951, undefined),
true
)
// It would be nice to test a better range, but the mocked ledger only supports this single number
assert.strictEqual(
await this.api.connection.hasLedgerVersions(8819951, 8819951),
true
)
assert.strictEqual(await this.api.connection.getFeeBase(), 10)
assert.strictEqual(await this.api.connection.getFeeRef(), 10)
})
it('with proxy', function(done) {
if (isBrowser) {
done()