Fix failing test.

This commit is contained in:
Dillon Kearns 2019-10-29 22:33:47 -07:00
parent e55f9069cc
commit e48c16da94
2 changed files with 13 additions and 8 deletions

View File

@ -624,6 +624,7 @@ sendStaticResponsesIfDone errors staticResponses manifest =
Err error ->
{ message =
[ Terminal.text path
, Terminal.text "\n\n"
, Terminal.text error
]
}
@ -653,7 +654,7 @@ sendStaticResponsesIfDone errors staticResponses manifest =
)
else
Errors <| errorsToString errors
Errors <| errorsToString (failedRequests ++ errors)
)
@ -690,21 +691,23 @@ errorToString : Error -> String
errorToString error =
case error of
MissingSecret buildError ->
banner "Missing Secret" :: buildError.message |> Terminal.toString
banner "Missing Secret" ++ buildError.message |> Terminal.toString
MetadataDecodeError buildError ->
banner "Metadata Decode Error" :: buildError.message |> Terminal.toString
banner "Metadata Decode Error" ++ buildError.message |> Terminal.toString
InternalError buildError ->
banner "Internal Error" :: buildError.message |> Terminal.toString
banner "Internal Error" ++ buildError.message |> Terminal.toString
FailedStaticHttpRequestError buildError ->
banner "Failed Static Http Error" :: buildError.message |> Terminal.toString
banner "Failed Static Http Error" ++ buildError.message |> Terminal.toString
banner title =
Terminal.cyan <|
Terminal.text ("-- " ++ String.toUpper title ++ " ----------------------------------------------------- elm-pages\n\n")
[ Terminal.cyan <|
Terminal.text ("-- " ++ String.toUpper title ++ " ----------------------------------------------------- elm-pages")
, Terminal.text "\n\n"
]
encodeStaticResponses : StaticResponses -> Dict String (Dict String String)

View File

@ -163,7 +163,9 @@ all =
(Codec.decoder Main.toJsCodec)
(Expect.equal
[ Errors
"""/elm-pages
"""\u{001B}[36m-- FAILED STATIC HTTP ERROR ----------------------------------------------------- elm-pages\u{001B}[0m
/elm-pages
Problem with the given value: