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

Expose runtime-handler dev Response class for testing purposes #384

Open
philnash opened this issue Jan 17, 2022 · 0 comments
Open

Expose runtime-handler dev Response class for testing purposes #384

philnash opened this issue Jan 17, 2022 · 0 comments

Comments

@philnash
Copy link
Contributor

philnash commented Jan 17, 2022

When testing Twilio functions locally you need to construct a global scope that contains a Twilio object that has a Response property, as well as a global Response property, in order to match the environment that Functions run in. In the function-templates repo we achieve this with setup and teardown methods with a mocked and out of date Response class.

The Response class from the runtime-handler is still effectively a mock, as it is a development version of the real Response that the deployed Functions runtime-handler uses, but it is up to date with the version of the runtime-handler that is being used. If we exposed this class (and perhaps a GlobalTwilio object somehow) then function-templates and customers could use the Response object that matches their runtime-handler version in their tests.

(see also RUN-4441)

@makserik makserik added this to the Improvements/Nice to haves milestone Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants