HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduletasty-wai-0.1.2.0Haskell2010

Test.Tasty.Wai

Types and functions for testing wai endpoints using the tasty testing framework.

  • 5 types
  • 30 values

Types

1 declaration
datadata Sess
#

Data structure for carrying around the info needed to build and run a test.

Constructors

Instances1IsTest
  • IsTest SessDefined in tasty-wai-0.1.2.0 · Test.Tasty.Wai

Creation

1 declaration
valuetestWai :: Application -> TestName -> Session () -> TestTree
#

Run a test case against a Application.

This module re-exports the functions from 'wai-extra' for constructing the Session that is executed against a given endpoint.

A small test case may look like:

import MyApp (app)

testWai app "List Topics" $ do
      res <- get "fudge/view"
      assertStatus' HTTP.status200 res

Helpers

6 declarations
valueassertStatus' :: Status -> SResponse -> Session ()
#

An alternative helper function for checking the status code on a response that lets you use the functions from Network.HTTP.Types as opposed to bare numbers.

Request Builders

27 declarations