Skip to content

Commit

Permalink
fix: smart contract account test
Browse files Browse the repository at this point in the history
  • Loading branch information
montelaidev committed Feb 26, 2024
1 parent 684481e commit a954fbf
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ const PATCH_USER_OPERATION_RESPONSE_MOCK: Awaited<
ReturnType<KeyringController['patchUserOperation']>
> = {
paymasterAndData: '0x123',
callGasLimit: '0x444',
verificationGasLimit: '0x555',
preVerificationGas: '0x667',
};

const SIGN_USER_OPERATION_RESPONSE_MOCK: Awaited<
Expand Down Expand Up @@ -222,6 +225,11 @@ describe('SnapSmartContractAccount', () => {

expect(response).toStrictEqual<UpdateUserOperationResponse>({
paymasterAndData: PATCH_USER_OPERATION_RESPONSE_MOCK.paymasterAndData,
callGasLimit: PATCH_USER_OPERATION_RESPONSE_MOCK.callGasLimit,
preVerificationGas:
PATCH_USER_OPERATION_RESPONSE_MOCK.preVerificationGas,
verificationGasLimit:
PATCH_USER_OPERATION_RESPONSE_MOCK.verificationGasLimit,
});

expect(patchMock).toHaveBeenCalledTimes(1);
Expand All @@ -244,6 +252,9 @@ describe('SnapSmartContractAccount', () => {

expect(response).toStrictEqual<UpdateUserOperationResponse>({
paymasterAndData: undefined,
callGasLimit: undefined,
preVerificationGas: undefined,
verificationGasLimit: undefined,
});
});
});
Expand Down

0 comments on commit a954fbf

Please sign in to comment.