zapier-platform
zapier-platform copied to clipboard
[Bug]: createAppTester's typescript types do not account for http request objects
Bug Description
The TypeScript type of the appTester
returned by createAppTester
assumes that a perform function is passed and does not allow for a HTTP request object from App.
Exported OAuth2 apps and various JS examples in this project show code, such as const result = await appTester(App.authentication.oauth2Config.getAccessToken, bundle);
, where requests are programmed without a perform
function and this works with the appTester
.
Publishing this kind of code as JS appears to work. So it's strange that when trying to use this same code in TypeScript it results in a type error instead.
Reproduction Steps
- Export an app using OAuth2 or the OAuth2 documentation's example
- Use the OAuth2 example's test to unit test that authentication
- Try to port the code to TypeScript
Zapier Platform version
15.5.3
Node.js version
v21.6.1
Your Operating System
WSL2 Ubuntu
npm/yarn version
No response
App ID
No response
More Details
No response