File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed
scenario-elm-pages-incompatible-wire/app/Route Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -79,8 +79,10 @@ makeDev :: FilePath -> FilePath -> IO ()
7979makeDev root path = do
8080 debug $ " 🏗 lamdera make " <> root <> " /" <> path
8181
82+ absRoot <- Dir. makeAbsolute root
83+
8284 r <- async $
83- Dir. withCurrentDirectory root $
85+ Dir. withCurrentDirectory absRoot $
8486 Make. run [path] $
8587 Make. Flags
8688 { _debug = True
Original file line number Diff line number Diff line change 1+ {-# LANGUAGE OverloadedStrings #-}
2+
13module Test.Ext.ElmPages.Check where
24
35import EasyTest
46import Test.Helpers
57
8+ import Lamdera
9+ import Lamdera.Compile
610
711all = EasyTest. run suite
812
913
1014suite :: Test ()
1115suite = tests $
1216 [ scope " isWireCompatible" $ do
13- expectEqual 1 1
14-
17+ actual <- catchOutput $
18+ Lamdera.Compile. makeDev " ./test/scenario-elm-pages-incompatible-wire/.elm-pages " " Main.elm "
1519
20+ expectTextContains actual
21+ " PageData:\\ n\\ n- must not contain functions"
1622 ]
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ type alias RouteParams =
2525
2626
2727type alias Data =
28- {}
28+ { unserialisableValue : Int -> Int }
2929
3030
3131route : StatelessRoute RouteParams Data
@@ -39,7 +39,7 @@ route =
3939
4040data : DataSource Data
4141data =
42- DataSource . succeed Data
42+ DataSource . succeed <| Data ( \ i -> i )
4343
4444
4545head :
You can’t perform that action at this time.
0 commit comments