mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-25 12:52:27 +03:00
Fix up elm.json and remove test only and logs.
This commit is contained in:
parent
a04f26bc99
commit
c20071a06e
@ -28,6 +28,7 @@
|
||||
"lukewestby/elm-string-interpolate": "1.0.4",
|
||||
"mdgriffith/elm-markup": "3.0.1",
|
||||
"mdgriffith/elm-ui": "1.1.5",
|
||||
"mgold/elm-nonempty-list": "4.0.2",
|
||||
"miniBill/elm-codec": "1.2.0",
|
||||
"noahzgordon/elm-color-extra": "1.0.2",
|
||||
"rtfeldman/elm-hex": "1.0.0",
|
||||
@ -36,6 +37,7 @@
|
||||
"indirect": {
|
||||
"elm/bytes": "1.0.8",
|
||||
"elm/file": "1.0.5",
|
||||
"elm/random": "1.0.0",
|
||||
"elm/regex": "1.0.0",
|
||||
"elm/time": "1.0.0",
|
||||
"elm/virtual-dom": "1.0.2",
|
||||
@ -46,8 +48,6 @@
|
||||
"direct": {
|
||||
"elm-explorations/test": "1.2.2"
|
||||
},
|
||||
"indirect": {
|
||||
"elm/random": "1.0.0"
|
||||
}
|
||||
"indirect": {}
|
||||
}
|
||||
}
|
@ -271,7 +271,7 @@ reducedJsonRequest url decoder =
|
||||
|> Json.Decode.Exploration.decodeString decoder
|
||||
-- |> Result.mapError Json.Decode.Exploration.errorsToString
|
||||
|> (\decodeResult ->
|
||||
case decodeResult |> Debug.log "decodeResult" of
|
||||
case decodeResult of
|
||||
Json.Decode.Exploration.BadJson ->
|
||||
Pages.StaticHttpRequest.DecoderError "" |> Err
|
||||
|
||||
|
@ -143,37 +143,36 @@ all =
|
||||
}
|
||||
]
|
||||
)
|
||||
, only <|
|
||||
test "reduced JSON is sent out" <|
|
||||
\() ->
|
||||
start
|
||||
[ ( []
|
||||
, StaticHttp.reducedJsonRequest "https://api.github.com/repos/dillonkearns/elm-pages" (Reduce.field "stargazer_count" Reduce.int)
|
||||
)
|
||||
]
|
||||
|> ProgramTest.simulateHttpOk
|
||||
"GET"
|
||||
"https://api.github.com/repos/dillonkearns/elm-pages"
|
||||
"""{ "stargazer_count": 86, "unused_field": 123 }"""
|
||||
|> ProgramTest.expectOutgoingPortValues
|
||||
"toJsPort"
|
||||
(Codec.decoder Main.toJsCodec)
|
||||
(Expect.equal
|
||||
[ Main.Success
|
||||
{ pages =
|
||||
Dict.fromList
|
||||
[ ( "/"
|
||||
, Dict.fromList
|
||||
[ ( "https://api.github.com/repos/dillonkearns/elm-pages"
|
||||
, """{"stargazer_count":86}"""
|
||||
)
|
||||
]
|
||||
)
|
||||
]
|
||||
, manifest = manifest
|
||||
}
|
||||
]
|
||||
)
|
||||
, test "reduced JSON is sent out" <|
|
||||
\() ->
|
||||
start
|
||||
[ ( []
|
||||
, StaticHttp.reducedJsonRequest "https://api.github.com/repos/dillonkearns/elm-pages" (Reduce.field "stargazer_count" Reduce.int)
|
||||
)
|
||||
]
|
||||
|> ProgramTest.simulateHttpOk
|
||||
"GET"
|
||||
"https://api.github.com/repos/dillonkearns/elm-pages"
|
||||
"""{ "stargazer_count": 86, "unused_field": 123 }"""
|
||||
|> ProgramTest.expectOutgoingPortValues
|
||||
"toJsPort"
|
||||
(Codec.decoder Main.toJsCodec)
|
||||
(Expect.equal
|
||||
[ Main.Success
|
||||
{ pages =
|
||||
Dict.fromList
|
||||
[ ( "/"
|
||||
, Dict.fromList
|
||||
[ ( "https://api.github.com/repos/dillonkearns/elm-pages"
|
||||
, """{"stargazer_count":86}"""
|
||||
)
|
||||
]
|
||||
)
|
||||
]
|
||||
, manifest = manifest
|
||||
}
|
||||
]
|
||||
)
|
||||
, test "the port sends out even if there are no http requests" <|
|
||||
\() ->
|
||||
start
|
||||
|
Loading…
Reference in New Issue
Block a user