sparse-intern-71089
03/17/2020, 4:09 AMwhite-balloon-205
great-vr-65723
03/23/2020, 3:56 AMcall
Mock.
From the type definition I see:
* @param token: The token that indicates which function is being called. This token is of the form "package:module:function".
And I have a mock like:
pulumi.runtime.setMocks({
call(token: string, args: any, provider?: string): any {
if (token === "aws:iam:getPolicyDocument") {
return {args};
}
},
newResource(type: string, name: string, inputs: any, provider?: string, id?: string): any {
return undefined
}
});
But I'm not sure if I'm setting the token correctly. The type definition says `
call mocks provider-implemented function calls (e.g. aws.get_availability_zones).
But that doesn't seem to match the format in the @param
statement.great-vr-65723
03/23/2020, 3:58 AMMock
requires both call
and newResource
to be set, even though I'm not using newResource
for my test.great-vr-65723
03/23/2020, 3:58 AMcall
Mock they can point me to, especially a TypeScript one?