Safe Haskell | None |
---|---|
Language | Haskell2010 |
Tests
Options
data TreatPendingAs Source #
How to treat hspec
pending tests.
tasty
does not have the concept of pending tests, so we must map them to
either successes or failures. By default, they are treated as failures.
Set via the command line flag --treat-pending-as (success|failure)
.
Re-exports
module Test.Hspec
Examples
The simplest usage of this library involves first creating a TestTree
in
IO
, then running it with defaultMain
.
main = do spec <-testSpec
"spec" mySpecdefaultMain
(testGroup
"tests" [ spec , ... ])
However, if you don't do any IO
during Spec
creation, or the IO
need
not be performed at any particular time relative to other IO
actions, it's
perfectly fine to use unsafePerformIO
.
main = dodefaultMain
(testGroup
"tests" [unsafePerformIO
(testSpec
"spec" mySpec) , ... ])