HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulesydtest-0.22.0.0Haskell2010

Test.Syd.Expectation

This module defines all the functions you will use to define your tests

  • 2 types
  • 25 values
  • Packagesydtest-0.22.0.0
  • Exports27
  • LanguageHaskell2010
  • LicenceLicenseRef-OtherLicense
  • SourceExpectation.hs
valuetextShouldBe :: HasCallStack => Text -> Text -> IO ()
#

Assert that two Texts are equal according to ==.

Note that using function could mess up the colours in your terminal if the Texts contain ANSI codes. In that case you may want to show your values first or use shouldBe instead.

Make a test fail

Note that this is mostly backward compatible, but it has return type a instead of () because execution will not continue beyond this function. In this way it is not entirely backward compatible with hspec because now there could be an ambiguous type error.

valuecontext :: String -> IO a -> IO a
#

Annotate a given action with a context, for contextual assertions

This is a completely different function from the function with the same name in hspec. In hspec, context is a synonym for describe, but in sydtest, context is used for contextual failures.