From baaedb3e32ae5f238216be31f9fa684996d7e626 Mon Sep 17 00:00:00 2001 From: iamnamananand996 Date: Wed, 6 Nov 2024 21:33:42 +0530 Subject: [PATCH] fix: :bug: update failed test cases --- tests/bolt.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/bolt.ts b/tests/bolt.ts index 37e0711..b00e641 100644 --- a/tests/bolt.ts +++ b/tests/bolt.ts @@ -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 () => { @@ -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 () => {