zapier-platform icon indicating copy to clipboard operation
zapier-platform copied to clipboard

[Bug]: createAppTester's typescript types do not account for http request objects

Open dantman opened this issue 4 months ago • 0 comments

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

  1. Export an app using OAuth2 or the OAuth2 documentation's example
  2. Use the OAuth2 example's test to unit test that authentication
  3. 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

dantman avatar Feb 14 '24 19:02 dantman