From 542068118104f579f508816559022758e0ef0f3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Choutri=20de=20Tarl=C3=A9?= Date: Wed, 13 Nov 2024 01:22:59 +0100 Subject: [PATCH] Add a test reporter (#787) --- cabal.project | 7 +++++++ flora.cabal | 1 + test/Main.hs | 7 +++++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/cabal.project b/cabal.project index b4242b50..b4838b9d 100644 --- a/cabal.project +++ b/cabal.project @@ -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 @@ -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 diff --git a/flora.cabal b/flora.cabal index 815216b7..83bcbdb3 100644 --- a/flora.cabal +++ b/flora.cabal @@ -502,6 +502,7 @@ test-suite flora-test , tar , tasty , tasty-hunit + , tasty-test-reporter , text , time , uuid diff --git a/test/Main.hs b/test/Main.hs index 6a362573..18f81bac 100644 --- a/test/Main.hs +++ b/test/Main.hs @@ -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 @@ -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 =