I have a google cloud function which I run in Google Identity Platform in the beforeCreate
trigger which looks like this:
import * as gcipCloudFunctions from "gcip-cloud-functions";
const authClient = new gcipCloudFunctions.Auth();
const beforeCreate = authClient.functions().beforeCreateHandler((user, context) => {
console.log("Hello world");
});
export default beforeCreate;
How do I go by to create jest test to mock this event? Or How can I create test to execute this function?