From d0178a0a4074d2a4ae79e2ae9ae3091edd0739b8 Mon Sep 17 00:00:00 2001 From: lcswillems Date: Fri, 10 Nov 2023 20:12:56 +0100 Subject: [PATCH] Add test to ensure no regression on the stack trace issue --- xsuite/src/world/sworld.test.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xsuite/src/world/sworld.test.ts b/xsuite/src/world/sworld.test.ts index 4d2c2678..3c3b5996 100644 --- a/xsuite/src/world/sworld.test.ts +++ b/xsuite/src/world/sworld.test.ts @@ -301,9 +301,11 @@ test("SWallet.callContract.assertFail - Wrong code", async () => { gasLimit: 10_000_000, }) .assertFail({ code: 5 }), - ).rejects.toThrow( - "Failed with unexpected error code.\nExpected code: 5\nReceived code: 4", - ); + ).rejects.toMatchObject({ + message: + "Failed with unexpected error code.\nExpected code: 5\nReceived code: 4", + stack: expect.stringContaining("src/world/sworld.test.ts:295:3)"), + }); }); test("SWallet.callContract.assertFail - Wrong message", async () => {