From 90efa7d59392da5af3be265aa6a3e50f3c85a922 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Thu, 23 Jul 2020 13:47:56 +0200 Subject: [PATCH] sdk38: Update staking extension historical info test --- packages/sdk38/src/lcdapi/staking.spec.ts | 36 ++++------------------- 1 file changed, 5 insertions(+), 31 deletions(-) diff --git a/packages/sdk38/src/lcdapi/staking.spec.ts b/packages/sdk38/src/lcdapi/staking.spec.ts index dad69be6..dfe91717 100644 --- a/packages/sdk38/src/lcdapi/staking.spec.ts +++ b/packages/sdk38/src/lcdapi/staking.spec.ts @@ -444,40 +444,14 @@ describe("StakingExtension", () => { }); }); - xdescribe("historicalInfo", () => { - it("works", async () => { - // TODO: Find a result for this test + describe("historicalInfo", () => { + it("doesn't work yet", async () => { pendingWithoutWasmd(); const client = makeStakingClient(wasmd.endpoint); const currentHeight = (await client.blocksLatest()).block.header.height; - const response = await client.staking.historicalInfo(currentHeight); - expect(response).toEqual({ - height: jasmine.stringMatching(nonNegativeIntegerMatcher), - result: { - header: { - version: { - block: "", - app: "", - }, - height: "", - chain_id: "", - time: "", - last_commit_hash: "", - last_block_id: { - hash: "", - }, - data_hash: "", - validators_hash: "", - next_validators_hash: "", - consensus_hash: "", - app_hash: "", - last_results_hash: "", - evidence_hash: "", - proposer_address: "", - }, - validators: [], - }, - }); + return expectAsync(client.staking.historicalInfo(currentHeight)).toBeRejectedWithError( + /no historical info found \(HTTP 400\)/i, + ); }); });