how to mock convex actions?
I'm trying to write tests for a function that uses AWS KMS decryption (fetchSomething). This function relies on internal.kms.decrypt action.
I've tried several approaches but all attempts resulted in type errors or failed decryption.
What's the correct way to mock an internal action in Convex tests?
Example of what I'm trying to test:
4 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
hi! are you using convex-test ?
hi jamie, yes i am!
is there a function in convext-test that would help out with mocking the function that calls aws client?
Haven’t tried but I’m wondering if there’s a way to get msw working here