zapier / zapier-platform

The SDK for you to build an integration on Zapier

Home Page:https://platform.zapier.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

dantman opened this issue · 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