mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-11 14:09:15 +00:00
Allow multiple tx results in "can query transactions by height"
This commit is contained in:
parent
c448d6beb1
commit
4701e1aaea
@ -515,12 +515,12 @@ describe("RestClient", () => {
|
|||||||
const client = new RestClient(wasmd.endpoint);
|
const client = new RestClient(wasmd.endpoint);
|
||||||
const result = await client.txsQuery(`tx.height=${posted.height}&limit=26`);
|
const result = await client.txsQuery(`tx.height=${posted.height}&limit=26`);
|
||||||
expect(result).toEqual({
|
expect(result).toEqual({
|
||||||
count: "1",
|
count: jasmine.stringMatching(/^(1|2|3|4|5)$/), // 1-5 transactions as string
|
||||||
limit: "26",
|
limit: "26",
|
||||||
page_number: "1",
|
page_number: "1",
|
||||||
page_total: "1",
|
page_total: "1",
|
||||||
total_count: "1",
|
total_count: jasmine.stringMatching(/^(1|2|3|4|5)$/), // 1-5 transactions as string
|
||||||
txs: [posted.tx],
|
txs: jasmine.arrayContaining([posted.tx]),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -387,12 +387,12 @@ describe("RestClient", () => {
|
|||||||
const client = new RestClient(wasmd.endpoint);
|
const client = new RestClient(wasmd.endpoint);
|
||||||
const result = await client.txsQuery(`tx.height=${posted.height}&limit=26`);
|
const result = await client.txsQuery(`tx.height=${posted.height}&limit=26`);
|
||||||
expect(result).toEqual({
|
expect(result).toEqual({
|
||||||
count: "1",
|
count: jasmine.stringMatching(/^(1|2|3|4|5)$/), // 1-5 transactions as string
|
||||||
limit: "26",
|
limit: "26",
|
||||||
page_number: "1",
|
page_number: "1",
|
||||||
page_total: "1",
|
page_total: "1",
|
||||||
total_count: "1",
|
total_count: jasmine.stringMatching(/^(1|2|3|4|5)$/), // 1-5 transactions as string
|
||||||
txs: [posted.tx],
|
txs: jasmine.arrayContaining([posted.tx]),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user