Change extension unit tests to mock HttpClient
Oceanswave opened this issue · 0 comments
Oceanswave commented
Unit tests of the extensions project are a bit flaky as they depend on uptime of httpbin, which is good, but sometimes can throttle or have invalid responses.
Steps:
- Inject HTTP Client as a singleton via DI in both the fetch implementation and the webresource middleware.
- Use mockhttp in unit tests - https://github.com/richardszalay/mockhttp