Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
srghma committed Jul 31, 2020
1 parent b15e1d3 commit ed28634
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
15 changes: 8 additions & 7 deletions examples/circle/src/Main.purs
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@ ui = H.mkComponent { initialState
where
render :: State -> H.ComponentHTML Action () g
render state =
SE.svg [SA.viewBox x y w h]
[ SE.circle
[ SA.r (if state.on then w/6.0 else w/3.0)
, SA.fill $ Just (SA.RGB 0 0 100)
, HE.onClick (const $ Just ToggleState)
SE.svg
[ SA.viewBox x y w h ]
[ SE.circle
[ SA.r (if state.on then w/6.0 else w/3.0)
, SA.fill $ Just (SA.RGB 0 0 100)
, HE.onClick (const $ Just ToggleState)
]
[]
]
]

where
h = 150.0
w = 150.0
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"postinstall": "spago install",
"build": "spago build --purs-args '--strict'",
"test": "spago test --purs-args '--strict'",
"examples:circle:build": "spago build --config examples/circle/spago.dhall",
"examples:circle:build": "spago --config examples/circle/spago.dhall build",
"examples:circle:bundle-app": "spago --config examples/circle/spago.dhall bundle-app --to examples/circle/dist/app.js"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion test/Main.purs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Effect.Console (log)

render :: forall state w i . state -> HH.HTML w i
render _ =
SE.svg [ SA.viewBox 0.0 0.0 100.0 100.0 ] [ SE.circle [ SA.r 10.0 ] ]
SE.svg [ SA.viewBox 0.0 0.0 100.0 100.0 ] [ SE.circle [ SA.r 10.0 ] [] ]

-- not a real test, just making sure things compile

Expand Down

0 comments on commit ed28634

Please sign in to comment.