Page MenuHomePhabricator

Consider a better testing strategy for the orchestrator
Open, MediumPublic

Description

Description

It's very hard to test our endpoints without messing with global config/environment variables. We should make the endpoint tests dependency-injectable.

A possible path forward:

  • the endpoint's functions are defined in separate modules;
  • tests use jest.fn or otherwise to mock those functions

Desired behavior/Acceptance criteria (returned value, expected error, performance expectations, etc.)

  • tests are insular and easier to express

Completion checklist