Skip to content

codewars/hspec-formatters-codewars

Repository files navigation

Test.Hspec.Formatters.Codewars

Hspec formatter for Qualified and Codewars.

Usage

Specify codewars formatter:

-- test/Main.hs
module Main (main) where

import Test.Hspec.Runner
import Test.Hspec.Formatters.Codewars (newFormatter)
import Test.Hspec.Core.Formatters.V2 (formatterToFormat)

import qualified Spec

main :: IO ()
main = do
  codewars <- newFormatter
  runSpec Spec.spec defaultConfig {configFormat = Just $ formatterToFormat codewars}
  >>= evaluateSummary
-- test/Spec.hs
{-# OPTIONS_GHC -F -pgmF hspec-discover -optF --module-name=Spec #-}

Development

stack build
stack test