{-# LANGUAGE QuasiQuotes #-} module PWXSpec ( pwxSpec ) 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 pwxSpec = describe "PWXParser" $ do it "Parses simple pwx" $ do let dom = [pwx|
Hello world!
|] -- we use () for an empty state _elt_tag (dom ()) `shouldBe` "p" _tn_text (head (_elt_children (dom ())) ()) `shouldBe` "Hello world!" it "Parses pwx with an event listener" $ do let dom = [pwx|