0 | module Test.Async.Spec.Runner
2 | import Data.Linear.Ref1
6 | import Test.Async.Spec.Report
7 | import Test.Async.Spec.TestEnv
8 | import Test.Async.Spec.TestResult
12 | toBool : Maybe String -> Bool
13 | toBool Nothing = False
21 | run : TestEnv => TestTree e -> Async e [] ()
22 | run (Leaf desc x) = x >>= report desc
23 | run (Node name xs) = do
26 | assert_total $
traverse_ run xs
30 | runTree : TestTree e -> Async e [] ()
32 | b <- toBool <$> getEnv "SPEC_COLOR"
35 | ts <- readref te.tests
36 | fs <- readref te.failures
38 | when (fs > 0) exitFailure