niklaslong / matrix-client

An experimental client for Matrix built in Elixir
1 stars 0 forks source link

Replace external tests with mocks #6

Open fancycade opened 4 years ago

fancycade commented 4 years ago

@niklaslong Do you have any idea for how we can mock out server responses?

Or should we just test against a localhost server?

I'm not exactly sure what the best approach is here.

niklaslong commented 4 years ago

Mox or Bypass are what I usually use. They come into play at different levels, the former mocks the http client and the latter mocks the server by redirecting the call to localhost. Both are being used for testing the SDK.