Fix getContracts test after #900 started to create additional instances

This commit is contained in:
Simon Warta 2021-10-12 13:43:11 +02:00
parent 502703b286
commit b6df15cff2

View File

@ -271,9 +271,13 @@ describe("CosmWasmClient", () => {
it("works", async () => {
pendingWithoutWasmd();
const client = await CosmWasmClient.connect(wasmd.endpoint);
const result = await client.getContracts(1);
const result = await client.getContracts(deployedHackatom.codeId);
const expectedAddresses = deployedHackatom.instances.map((info) => info.address);
expect(result).toEqual(expectedAddresses);
// Test first 3 instances we get from scripts/wasmd/init.sh. There may me more than that in the result.
expect(result[0]).toEqual(expectedAddresses[0]);
expect(result[1]).toEqual(expectedAddresses[1]);
expect(result[2]).toEqual(expectedAddresses[2]);
});
});