MIT licensed by Freckle R&D
Maintained by [email protected]
This version can be pinned in stack with:hspec-junit-formatter-1.0.2.0@sha256:c1c11ce32e13caf7d9b0e6ddec7c8d4b8a97a2ac4a9db7fd28c36712f2273dc4,3768

hspec-junit-formatter

A JUnit XML runner/formatter for hspec.

Usage

import Test.Hspec
import Test.Hspec.Core.Runner (defaultConfig, hspecWith)
import Test.Hspec.JUnit

main :: IO ()
main = do
  let
    junitConfig = setJUnitConfigOutputDirectory "/tmp" $ defaultJUnitConfig "my-tests"
    hspecConfig = configWithJUnit junitConfig defaultConfig

  hspecWith hspecConfig spec

spec :: Spec
spec = describe "Addition" $ do
  it "adds" $ do
    2 + 2 `shouldBe` (4 :: Int)

LICENSE

Changes

Unreleased

None

v1.0.2.0

  • Create Test.Hspec module-space and deprecate misspelled Test.HSpec modules
  • Introduce configWithJUnit and JUnitConfig

v1.0.1.0

  • Format function can be used directly without withConfig or runJUnitSpec.
  • Test case duration is now supported.
  • Failure locations are listed for some result types.
  • Timestamps in the resulting XML now display the start time of formatting.

v1.0.0.4

  • Bring base bound back in to fix release

v1.0.0.3

  • Remove dependencies upper bounds

v1.0.0.2

  • Less restrictive upper bound on base

v1.0.0.1

  • Bump base dep

v1.0.0.0

Initial release.