Hspec: Skipping tests

I have some acceptance tests that I only want to run locally (i.e. skip them in the CI). when :: Applicative f => Bool -> f () -> f() from Control.Monad allows for conditional execution of Applicative expressions, so I can do something like

module FooSpec where

spec :: Spec
spec = do
  devMode <- runIO isDevMode
  when devMode $ describe "foobar" $ using chrome ...

isDevMode :: IO Bool
isDevMode = getEnvDefault ..
 
3
Kudos
 
3
Kudos

Now read this

Lucid: Conditional rendering

I have a form written in Lucid and I need to add a prompt to the user based on some condition: someForm :: Bool -> Html () someForm condition = body_ $ ... renderIfCondition where renderIfCondition | condition = div_ $ p_ [] "Some... Continue →