Skip to content

Commit

Permalink
fix: update expected blocks for failing tests
Browse files Browse the repository at this point in the history
The real issue is using callPublicFn instead of mineBlock, as it does not provide the block height the TX was sent in. A more sustainable solution would be to use mineBlock with the tx data, then using its height property to perform the check. This error will get triggered again if anything is changed around the deployment plan, e.g. a new contract is added.
  • Loading branch information
whoabuddy committed Oct 11, 2024
1 parent 9d30b13 commit 7e23555
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/aibtcdev-resources-v1.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ describe("Toggling a Resource Status", () => {
expect(response.result).toBeOk(Cl.bool(false));
expect(resourceResponse.result).toBeSome(
Cl.tuple({
createdAt: Cl.uint(2),
createdAt: Cl.uint(3),
enabled: Cl.bool(false),
description: Cl.stringUtf8("Generate a unique Bitcoin face."),
name: Cl.stringUtf8("Bitcoin Face"),
Expand All @@ -247,7 +247,7 @@ describe("Toggling a Resource Status", () => {
expect(response2.result).toBeOk(Cl.bool(true));
expect(resourceResponse2.result).toBeSome(
Cl.tuple({
createdAt: Cl.uint(2),
createdAt: Cl.uint(3),
enabled: Cl.bool(true),
description: Cl.stringUtf8("Generate a unique Bitcoin face."),
name: Cl.stringUtf8("Bitcoin Face"),
Expand Down Expand Up @@ -348,7 +348,7 @@ describe("Toggling a Resource Status", () => {
expect(response.result).toBeOk(Cl.bool(false));
expect(resourceResponse.result).toBeSome(
Cl.tuple({
createdAt: Cl.uint(2),
createdAt: Cl.uint(3),
enabled: Cl.bool(false),
description: Cl.stringUtf8("Generate a unique Bitcoin face."),
name: Cl.stringUtf8("Bitcoin Face"),
Expand All @@ -360,7 +360,7 @@ describe("Toggling a Resource Status", () => {
expect(response2.result).toBeOk(Cl.bool(true));
expect(resourceResponse2.result).toBeSome(
Cl.tuple({
createdAt: Cl.uint(2),
createdAt: Cl.uint(3),
enabled: Cl.bool(true),
description: Cl.stringUtf8("Generate a unique Bitcoin face."),
name: Cl.stringUtf8("Bitcoin Face"),
Expand Down Expand Up @@ -818,7 +818,7 @@ describe("Paying an Invoice", () => {
// ASSERT
expect(resourceResponse.result).toBeSome(
Cl.tuple({
createdAt: Cl.uint(4),
createdAt: Cl.uint(5),
enabled: Cl.bool(true),
description: Cl.stringUtf8("Generate a unique Bitcoin face."),
name: Cl.stringUtf8("Bitcoin Face"),
Expand Down

0 comments on commit 7e23555

Please sign in to comment.