Skip to content

Commit

Permalink
fix: 🐛 update failed test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
iamnamananand996 committed Nov 6, 2024
1 parent f05556d commit baaedb3
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions tests/bolt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,11 @@ describe("bolt", () => {
seed: "origin-component",
componentId: boltComponentProgram.programId,
});
await provider.sendAndConfirm(initializeComponent.transaction);
try {
await provider.sendAndConfirm(initializeComponent.transaction);
} catch (error) {
expect(error.message).to.contain("Error Code: MustBeCalledViaCpi");
}
});

it("Initialize Original Component on Entity 2, through the world instance", async () => {
Expand All @@ -250,7 +254,12 @@ describe("bolt", () => {
seed: "origin-component",
componentId: boltComponentProgram.programId,
});
await provider.sendAndConfirm(initializeComponent.transaction);

try {
await provider.sendAndConfirm(initializeComponent.transaction);
} catch (error) {
expect(error.message).to.contain("Error Code: MustBeCalledViaCpi");
}
});

it("Initialize Position Component on Entity 1", async () => {
Expand Down

0 comments on commit baaedb3

Please sign in to comment.