From ec25afbe02281ab7ad8439ed1f6e09b601a19cff Mon Sep 17 00:00:00 2001 From: Alex Gherghisan Date: Thu, 26 Oct 2023 12:19:13 +0100 Subject: [PATCH] test: update expected error messages --- .../end-to-end/src/e2e_cross_chain_messaging.test.ts | 6 ++---- .../end-to-end/src/e2e_public_cross_chain_messaging.test.ts | 2 +- yarn-project/end-to-end/src/shared/uniswap_l1_l2.ts | 6 ++---- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/yarn-project/end-to-end/src/e2e_cross_chain_messaging.test.ts b/yarn-project/end-to-end/src/e2e_cross_chain_messaging.test.ts index 2aa7f94cbeb..921e17e35f3 100644 --- a/yarn-project/end-to-end/src/e2e_cross_chain_messaging.test.ts +++ b/yarn-project/end-to-end/src/e2e_cross_chain_messaging.test.ts @@ -158,7 +158,7 @@ describe('e2e_cross_chain_messaging', () => { secretForL2MessageConsumption, ) .simulate(), - ).rejects.toThrowError("Cannot satisfy constraint 'l1_to_l2_message_data.message.content == content"); + ).rejects.toThrowError('Cannot satisfy constraint'); // send the right one - const consumptionTx = l2Bridge @@ -231,8 +231,6 @@ describe('e2e_cross_chain_messaging', () => { .withWallet(user2Wallet) .methods.claim_public(ownerAddress, bridgeAmount, ethAccount, messageKey, secretForL2MessageConsumption) .simulate(), - ).rejects.toThrowError( - "Failed to solve brillig function, reason: explicit trap hit in brillig 'l1_to_l2_message_data.message.content == content'", - ); + ).rejects.toThrowError('Failed to solve brillig function, reason: explicit trap hit in brillig'); }, 50_000); }); diff --git a/yarn-project/end-to-end/src/e2e_public_cross_chain_messaging.test.ts b/yarn-project/end-to-end/src/e2e_public_cross_chain_messaging.test.ts index d42b21af784..eafa74562a3 100644 --- a/yarn-project/end-to-end/src/e2e_public_cross_chain_messaging.test.ts +++ b/yarn-project/end-to-end/src/e2e_public_cross_chain_messaging.test.ts @@ -179,6 +179,6 @@ describe('e2e_public_cross_chain_messaging', () => { .withWallet(user2Wallet) .methods.claim_private(secretHash, bridgeAmount, ethAccount, messageKey, secret) .simulate(), - ).rejects.toThrowError("Cannot satisfy constraint 'l1_to_l2_message_data.message.content == content"); + ).rejects.toThrowError('Cannot satisfy constraint'); }); }); diff --git a/yarn-project/end-to-end/src/shared/uniswap_l1_l2.ts b/yarn-project/end-to-end/src/shared/uniswap_l1_l2.ts index 44a7584523f..5ac6beaca63 100644 --- a/yarn-project/end-to-end/src/shared/uniswap_l1_l2.ts +++ b/yarn-project/end-to-end/src/shared/uniswap_l1_l2.ts @@ -588,9 +588,7 @@ export const uniswapL1L2TestSuite = ( await ownerWallet.setPublicAuth(swapMessageHash, true).send().wait(); // Swap! - await expect(action.simulate()).rejects.toThrowError( - "Assertion failed: Message not authorized by account 'result == IS_VALID_SELECTOR'", - ); + await expect(action.simulate()).rejects.toThrowError('Assertion failed: Message not authorized by account'); }); it("uniswap can't pull funds without transfer approval", async () => { @@ -623,7 +621,7 @@ export const uniswapL1L2TestSuite = ( Fr.ZERO, ) .simulate(), - ).rejects.toThrowError(`Assertion failed: Message not authorized by account 'result == IS_VALID_SELECTOR'`); + ).rejects.toThrowError('Assertion failed: Message not authorized by account'); }); // tests when trying to mix private and public flows: