mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-23 11:55:41 +03:00
Fix test error.
This commit is contained in:
parent
c511d2642f
commit
c847e32857
@ -671,19 +671,11 @@ simulateEffects effect =
|
|||||||
|> List.map simulateEffects
|
|> List.map simulateEffects
|
||||||
|> SimulatedEffect.Cmd.batch
|
|> SimulatedEffect.Cmd.batch
|
||||||
|
|
||||||
Effect.FetchHttp unmasked ->
|
Effect.FetchHttp requests ->
|
||||||
if unmasked.url |> String.startsWith "port://" then
|
requests
|
||||||
let
|
|> List.map
|
||||||
portName : String
|
(\request -> ( Request.hash request, request ))
|
||||||
portName =
|
|> ToJsPayload.DoHttp
|
||||||
String.dropLeft 7 unmasked.url
|
|
||||||
in
|
|
||||||
ToJsPayload.Port portName
|
|
||||||
|> sendToJsPort
|
|
||||||
|> SimulatedEffect.Cmd.map never
|
|
||||||
|
|
||||||
else
|
|
||||||
ToJsPayload.DoHttp (Request.hash unmasked) unmasked
|
|
||||||
|> sendToJsPort
|
|> sendToJsPort
|
||||||
|> SimulatedEffect.Cmd.map never
|
|> SimulatedEffect.Cmd.map never
|
||||||
|
|
||||||
@ -843,7 +835,7 @@ simulateHttp request response program =
|
|||||||
(Codec.decoder (ToJsPayload.successCodecNew2 "" ""))
|
(Codec.decoder (ToJsPayload.successCodecNew2 "" ""))
|
||||||
(\actualPorts ->
|
(\actualPorts ->
|
||||||
case actualPorts of
|
case actualPorts of
|
||||||
[ ToJsPayload.DoHttp _ _ ] ->
|
[ ToJsPayload.DoHttp _ ] ->
|
||||||
Expect.pass
|
Expect.pass
|
||||||
|
|
||||||
_ ->
|
_ ->
|
||||||
@ -863,7 +855,7 @@ simulateMultipleHttp requests program =
|
|||||||
(Codec.decoder (ToJsPayload.successCodecNew2 "" ""))
|
(Codec.decoder (ToJsPayload.successCodecNew2 "" ""))
|
||||||
(\actualPorts ->
|
(\actualPorts ->
|
||||||
case actualPorts of
|
case actualPorts of
|
||||||
(ToJsPayload.DoHttp _ _) :: _ ->
|
(ToJsPayload.DoHttp _) :: _ ->
|
||||||
-- TODO check count of HTTP requests, and check the URLs
|
-- TODO check count of HTTP requests, and check the URLs
|
||||||
Expect.pass
|
Expect.pass
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user