From 4701e1aaeaaab02f06419cf4b04dbf22fee4b345 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Fri, 5 Jun 2020 11:06:47 +0200 Subject: [PATCH] Allow multiple tx results in "can query transactions by height" --- packages/cosmwasm/src/restclient.spec.ts | 6 +++--- packages/sdk38/src/restclient.spec.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/cosmwasm/src/restclient.spec.ts b/packages/cosmwasm/src/restclient.spec.ts index a0a810cd..978e2f20 100644 --- a/packages/cosmwasm/src/restclient.spec.ts +++ b/packages/cosmwasm/src/restclient.spec.ts @@ -515,12 +515,12 @@ describe("RestClient", () => { const client = new RestClient(wasmd.endpoint); const result = await client.txsQuery(`tx.height=${posted.height}&limit=26`); expect(result).toEqual({ - count: "1", + count: jasmine.stringMatching(/^(1|2|3|4|5)$/), // 1-5 transactions as string limit: "26", page_number: "1", page_total: "1", - total_count: "1", - txs: [posted.tx], + total_count: jasmine.stringMatching(/^(1|2|3|4|5)$/), // 1-5 transactions as string + txs: jasmine.arrayContaining([posted.tx]), }); }); diff --git a/packages/sdk38/src/restclient.spec.ts b/packages/sdk38/src/restclient.spec.ts index 6088738b..3e919e14 100644 --- a/packages/sdk38/src/restclient.spec.ts +++ b/packages/sdk38/src/restclient.spec.ts @@ -387,12 +387,12 @@ describe("RestClient", () => { const client = new RestClient(wasmd.endpoint); const result = await client.txsQuery(`tx.height=${posted.height}&limit=26`); expect(result).toEqual({ - count: "1", + count: jasmine.stringMatching(/^(1|2|3|4|5)$/), // 1-5 transactions as string limit: "26", page_number: "1", page_total: "1", - total_count: "1", - txs: [posted.tx], + total_count: jasmine.stringMatching(/^(1|2|3|4|5)$/), // 1-5 transactions as string + txs: jasmine.arrayContaining([posted.tx]), }); });