Closed
Description
While pair-programming on #3858 with @vapurrmaid, it wasn't super clear to us why test/utils/httpserver.ts
was set it up as an abstraction on top of http
.
We were trying to extend and use it for some new tests and had trouble following the code.
As noted during pair programming - Using the http and node-fetch libraries directly is easier (LoC and maintainability). I have concerns about the custom class used in testing that abstracts these.
Reasons to refactor
- the interface will stay up-to-date (i.e.
http
andnode-fetch
) as opposed to code getting stale in our custom abstraction - easier to maintain
Reasons to leave as is
@code-asher brought up some good points saying if we were to refactor it and use http
and node-fetch
, we may end up duplicating a lot of code.