Module

Hyper.Test.TestServer

Package
purescript-hyper
Repository
owickstrom/hyper

#TestRequest Source

newtype TestRequest

Constructors

Instances

#defaultRequest Source

defaultRequest :: { body :: String, headers :: Object String, method :: Either Method CustomMethod, url :: String }

#TestResponse Source

data TestResponse b state

Constructors

Instances

#testStatus Source

testStatus :: forall state b. TestResponse b state -> Maybe Status

#testHeaders Source

testHeaders :: forall state b. TestResponse b state -> Array Header

#testBodyChunks Source

testBodyChunks :: forall state b. TestResponse b state -> Array b

#testBody Source

testBody :: forall state b. Monoid b => TestResponse b state -> b

#testStringBody Source

testStringBody :: forall state. TestResponse StringBody state -> String

#testServer Source

testServer :: forall state b a m. Monad m => WriterT (TestResponse b state) m a -> m (TestResponse b state)

#resetResponse Source

resetResponse :: forall b a body c req. Conn req (TestResponse body a) c -> Conn req (TestResponse body b) c