hspec-junit-formatter-1.1.2.1: A JUnit XML runner/formatter for hspec
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Hspec.JUnit.Formatter.Env

Description

Version of Test.Hspec.JUnit.Formatter that reads config from ENV

-- file test/SpecHook.hs
module SpecHook where

import Test.Hspec
import Test.Hspec.JUnit.Formatter.Env qualified as Formatter

-- | To always produce a JUnit file, taking all config from the environment
hook :: Spec -> Spec
hook = Formatter.add

-- | Same, but only if JUNIT_ENABLED=1
hook :: Spec -> Spec
hook = Formatter.whenEnabled Formatter.add

Documentation