{-# LANGUAGE QuasiQuotes #-} module HSXSpec ( hsxSpec ) where import Control.Monad import qualified Data.HashMap.Strict as HM import Control.Monad.Reader import Data.IORef import Test.Hspec import Web.Framework.Plzwrk hsxSpec = describe "HSXParser" $ do it "Parses simple hsx" $ do let dom = [hsx|
Hello world!
|] -- we use () for an empty state _elt_tag (dom ()) `shouldBe` "p" _tn_text (((_elt_children (dom ())) !! 0) ()) `shouldBe` "Hello world!" it "Parses hsx with an event listener" $ do let dom = [hsx|