Issues with @effect/vitest and HttpClient Error Handling in Tests
I try to write reusable request function with HttpClient from @effect/platform, and add some test with vitest to make sure the function works fine. And last week I just notice effect has @effect/vitest to test effect directly. So, I change the test suite to @effect/vitest. And then I got problem, some of my test return different result with the regular vitest. The function is still same without any changes, just change from regular vitest to @effect/vitest.
Here the test suite:
Here the function to request:
In this part I just want to make sure in the test suite if I request to not exist endpoint it will error.
Here sandbox to try run the test:
https://codesandbox.io/p/devbox/2dtktm
Maybe I'm not correct with @effect/vitest implementation, or maybe the function with HttpClient is not correct in my code. Maybe somebody can help me.
Thank you.
Here the test suite:
Here the function to request:
In this part I just want to make sure in the test suite if I request to not exist endpoint it will error.
Here sandbox to try run the test:
https://codesandbox.io/p/devbox/2dtktm
Maybe I'm not correct with @effect/vitest implementation, or maybe the function with HttpClient is not correct in my code. Maybe somebody can help me.
Thank you.
