Fix test error.

This commit is contained in:
Dillon Kearns 2023-01-17 15:46:40 -08:00
parent c511d2642f
commit c847e32857

View File

@ -671,19 +671,11 @@ simulateEffects effect =
|> List.map simulateEffects
|> SimulatedEffect.Cmd.batch
Effect.FetchHttp unmasked ->
if unmasked.url |> String.startsWith "port://" then
let
portName : String
portName =
String.dropLeft 7 unmasked.url
in
ToJsPayload.Port portName
|> sendToJsPort
|> SimulatedEffect.Cmd.map never
else
ToJsPayload.DoHttp (Request.hash unmasked) unmasked
Effect.FetchHttp requests ->
requests
|> List.map
(\request -> ( Request.hash request, request ))
|> ToJsPayload.DoHttp
|> sendToJsPort
|> SimulatedEffect.Cmd.map never
@ -843,7 +835,7 @@ simulateHttp request response program =
(Codec.decoder (ToJsPayload.successCodecNew2 "" ""))
(\actualPorts ->
case actualPorts of
[ ToJsPayload.DoHttp _ _ ] ->
[ ToJsPayload.DoHttp _ ] ->
Expect.pass
_ ->
@ -863,7 +855,7 @@ simulateMultipleHttp requests program =
(Codec.decoder (ToJsPayload.successCodecNew2 "" ""))
(\actualPorts ->
case actualPorts of
(ToJsPayload.DoHttp _ _) :: _ ->
(ToJsPayload.DoHttp _) :: _ ->
-- TODO check count of HTTP requests, and check the URLs
Expect.pass