-
-
Notifications
You must be signed in to change notification settings - Fork 28
Negative tests for edge functions with Deno #65
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
Comments
Ugly workaround to make my tests pass ...
|
Also running into this when running tests with supabase-js, it seems to only happen on tests that are testing for an error response |
Any news on this? |
This worked for us:
And:
Because we always return a message with an error response:
Which we can assert in the edge function test. |
any news on this? Pretty frustrating to have to keep commenting out my negative test cases .... you should be able to test for handling around non-existent storage resources without this happening. |
Bug report
Describe the bug
I am trying to write some negative tests for my edge functions, for example:
But when running
deno test
, the test fails with:But I cannot access the response to consume/close/cancel/... it.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
deno test
Expected behavior
I expect the test to pass, without any leaking resources.
System information
The text was updated successfully, but these errors were encountered: