Skip to content

Consider refactoring test/utils/httpserver.ts  #3864

Closed
@jsjoeio

Description

@jsjoeio

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 and node-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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    choreRelated to maintenance or clean uptestingAnything related to testing

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions