mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-23 03:42:04 +03:00
Fix test error.
This commit is contained in:
parent
c511d2642f
commit
c847e32857
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user