Skip to content

Commit

Permalink
test: update expected error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
alexghr committed Oct 26, 2023
1 parent 82c01e2 commit ec25afb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
6 changes: 2 additions & 4 deletions yarn-project/end-to-end/src/e2e_cross_chain_messaging.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
});
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});
});
6 changes: 2 additions & 4 deletions yarn-project/end-to-end/src/shared/uniswap_l1_l2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit ec25afb

Please sign in to comment.