OpenFn/kit

cli: unit tests for apollo command

Open

#702 opened on May 28, 2024

View on GitHub
 (0 comments) (0 reactions) (0 assignees)TypeScript (19 forks)auto 404
DevXgood first issue

Repository metrics

Stars
 (20 stars)
PR merge metrics
 (PR metrics pending)

Description

I am not planning to do this before the apollo release, so here's some notes:

  • Unit tests need to mock an apollo server. Not totally easy as it needs to be a websocket server.
  • Don't test services, but test CLI behaviours. Like how to handle a { files } result
  • Ideally I'd like tests against the echo service which can be easily reproduced with the actual CLI. So I can copy and paste the test name and just run it - a bit like how our integration tests work
  • I don't want any integration tests on this right now

Contributor guide