Module

Node.Express.Test.Mock

Package
purescript-express
Repository
dancingrobot84/purescript-express

#MockCookie Source

type MockCookie = { name :: String, options :: String, value :: String }

#MockResponse Source

type MockResponse = { cookies :: StrMap MockCookie, data :: String, headers :: StrMap String, statusCode :: Int }

#MockRequest Source

newtype MockRequest

Constructors

#createMockApp Source

createMockApp :: forall e. Eff (exception :: EXCEPTION, express :: EXPRESS, testOutput :: TESTOUTPUT | e) Application

#createMockRequest Source

#TestExpress Source

type TestExpress e = Aff (exception :: EXCEPTION, express :: EXPRESS, testOutput :: TESTOUTPUT | e)

#testExpress Source

testExpress :: forall e. String -> TestMockApp e -> TestSuite (exception :: EXCEPTION, express :: EXPRESS, testOutput :: TESTOUTPUT | e)

#setupMockApp Source

setupMockApp :: forall e. TestApp e -> TestMockApp e

#sendRequest Source

#sendError Source

#assertMatch Source

assertMatch :: forall e a. Show a => Eq a => String -> a -> a -> Test e

#assertInApp Source

assertInApp :: forall e. (Reporter e -> TestApp e) -> TestMockApp e

#assertStatusCode Source

#assertHeader Source

#assertData Source

#assertCookieValue Source

#setTestHeader Source

setTestHeader :: forall e. String -> Handler e

#assertTestHeader Source