Page MenuHomePhabricator

Consider a better testing strategy for the orchestrator
Closed, ResolvedPublic

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

Event Timeline

I think we are okay shape now; we have a number of testing strategies of different granularities now. Recommend closing.