Fibery-inc / fibery-web-extension

MIT License
6 stars 4 forks source link

Integration testing approach #4

Open Maxim-Filimonov opened 1 year ago

Maxim-Filimonov commented 1 year ago

As mention in #3 I would like to start discussion about what approach to take for integration testing of fetcher.ts. Does Fibery team already uses something internally which can be utililized to mock API ?

I have experience with following approaches:

  1. API Blueprint or Open API with Dredd
  2. Pact integration testing with api contracts.
Mavrin commented 1 year ago

I think MSW would be a better choice for this project. We use MSW internally for frontend integration testing, but for server-to-server testing, we prefer setting up real services and running end-to-end tests. It is possible that we will use Pact or Dredd in the future, but it is not in the near future.