小编Vla*_*laj的帖子

如何模拟 Identity Platform Authentication 以触发 beforeCreateHandler

我有一个谷歌云函数,我在谷歌身份平台的触发器中运行beforeCreate它,如下所示:

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;
Run Code Online (Sandbox Code Playgroud)

我如何创建笑话测试来模拟此事件?或者如何创建测试来执行此功能?

阻塞函数

unit-testing node.js google-cloud-functions ts-jest google-cloud-identity

5
推荐指数
1
解决办法
340
查看次数