Skip to content

Commit

Permalink
Add a test reporter (#787)
Browse files Browse the repository at this point in the history
  • Loading branch information
tchoutri authored Nov 13, 2024
1 parent 54fd56b commit 5420681
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
7 changes: 7 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ allow-newer: type-errors-pretty:base
, qrcode-core:text
, qrcode-juicypixels:bytestring
, qrcode-core:bytestring
, tasty-test-reporter:ansi-terminal
, tasty-test-reporter:tasty

allow-older: pg-entity:time

Expand Down Expand Up @@ -67,3 +69,8 @@ source-repository-package
type: git
location: https://github.com/luc-tielen/souffle-haskell
tag: 268a112

source-repository-package
type: git
location: https://github.com/goodlyrottenapple/tasty-test-reporter
tag: b704130
1 change: 1 addition & 0 deletions flora.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ test-suite flora-test
, tar
, tasty
, tasty-hunit
, tasty-test-reporter
, text
, time
, uuid
Expand Down
7 changes: 5 additions & 2 deletions test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import Effectful
import Effectful.PostgreSQL.Transact.Effect (DB, dbtToEff)
import Sel.Hashing.Password qualified as Sel
import System.IO
import Test.Tasty (defaultMain, testGroup)
import Test.Tasty
import Test.Tasty.Runners.Reporter qualified as Reporter

import Flora.BlobSpec qualified as BlobSpec
import Flora.CabalSpec qualified as CabalSpec
Expand Down Expand Up @@ -45,7 +46,9 @@ main = do
)
env
spec <- traverse (\comp -> runTestEff comp env) (specs fixtures)
defaultMain . testGroup "Flora Tests" $ OddJobSpec.spec : spec
defaultMainWithIngredients [Reporter.ingredient] $
testGroup "Flora Tests" $
OddJobSpec.spec : spec

specs :: Fixtures -> [TestEff TestTree]
specs fixtures =
Expand Down

0 comments on commit 5420681

Please sign in to comment.