Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dantman opened this issue Feb 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@dantman
Copy link

dantman commented Feb 14, 2024

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 dantman added the bug Something isn't working label Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant