You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My project uses Finch to make parallel HTTP requests.
I tried to add bypass to my tests, but the HTTP requests are not being detected. When I run the test, I get this error:
No HTTP request arrived at Bypass
Here is my test:
defmoduleMyClientTestdouseExUnit.Case,async: truesetupdobypass=Bypass.open(){:ok,bypass: bypass}enddescribe"list_apps"dotest"should have an expected app",%{bypass: bypass}do{:ok,contents}=File.read("test/apps.json")Bypass.expect(bypass,fnconn->Plug.Conn.resp(conn,200,contents)end)list_apps=MyClient.list_apps()assertlength(list_apps)==57endendend
I don't think bypass does anything magical, so you still have to set your host on the client to the bypass listener: host = "http://localhost:#{bypass.port}"
My project uses Finch to make parallel HTTP requests.
I tried to add bypass to my tests, but the HTTP requests are not being detected. When I run the test, I get this error:
No HTTP request arrived at Bypass
Here is my test:
Here is my MyClient module:
The text was updated successfully, but these errors were encountered: