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