sydtest-wai-0.2.0.2: A wai companion library for sydtest
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Syd.Wai.Def

Synopsis

Documentation

waiClientSpec :: Application -> TestDefM (Manager ': outers) (WaiClient ()) result -> TestDefM outers oldInner result Source #

Run a given Application around every test.

This provides a 'WaiClient ()' which contains the port of the running application.

waiClientSpecWith :: IO Application -> TestDefM (Manager ': outers) (WaiClient ()) result -> TestDefM outers oldInner result Source #

Run a given Application, as built by the given action, around every test.

waiClientSpecWithSetupFunc :: (Manager -> oldInner -> SetupFunc (Application, env)) -> TestDefM (Manager ': outers) (WaiClient env) result -> TestDefM outers oldInner result Source #

Run a given Application, as built by the given SetupFunc, around every test.

waiClientSpecWithSetupFunc' :: (Manager -> oldInner -> SetupFunc (Application, env)) -> TestDefM (Manager ': outers) (WaiClient env) result -> TestDefM (Manager ': outers) oldInner result Source #

Run a given Application, as built by the given SetupFunc, around every test.

This function doesn't set up the Manager like waiClientSpecWithSetupFunc does.

waiClientSetupFunc :: Manager -> Application -> env -> SetupFunc (WaiClient env) Source #

A SetupFunc for a WaiClient, given an Application and user-defined env.

waiSpec :: Application -> TestDef outers PortNumber -> TestDef outers () Source #

Run a given Application around every test.

This provides the port on which the application is running.

waiSpecWith :: (forall r. (Application -> IO r) -> IO r) -> TestDef outers PortNumber -> TestDef outers () Source #

Run a Application around every test by setting it up with the given setup function.

This provides the port on which the application is running.

waiSpecWith' :: (forall r. (Application -> IO r) -> inner -> IO r) -> TestDef outers PortNumber -> TestDef outers inner Source #

Run a Application around every test by setting it up with the given setup function that can take an argument. a This provides the port on which the application is running.

waiSpecWithSetupFunc :: SetupFunc Application -> TestDef outers PortNumber -> TestDef outers () Source #

Run a Application around every test by setting it up with the given SetupFunc. a This provides the port on which the application is running.

waiSpecWithSetupFunc' :: (inner -> SetupFunc Application) -> TestDef outers PortNumber -> TestDef outers inner Source #

Run a Application around every test by setting it up with the given SetupFunc and inner resource. a This provides the port on which the application is running.

applicationSetupFunc :: Application -> SetupFunc PortNumber Source #

A SetupFunc to run an application and provide its port.

managerSpec :: TestDefM (Manager ': outers) inner result -> TestDefM outers inner result Source #

Create a Manager before all tests in the given group.