@@ -1,41 +0,0 @@
1−module Test.Spec.Mocha (
8−import Control.Monad.Aff (Aff())
9−import Control.Monad.Eff (kind Effect, Eff())
11−import Data.Foldable (traverse_)
13−import Test.Spec (Spec, Group(..), collect)
15−foreign import data MOCHA :: Effect
17−foreign import itAsync :: forall e.
21− -> Eff (mocha :: MOCHA | e) Unit
23−foreign import itPending :: forall e. String
24− -> Eff (mocha :: MOCHA | e) Unit
26−foreign import describe :: forall e.
29− -> Eff (mocha :: MOCHA | e) Unit
30− -> Eff (mocha :: MOCHA | e) Unit
32−registerGroup :: forall e. (Group (Aff e Unit))
33− -> Eff (mocha :: MOCHA | e) Unit
34−registerGroup (It only name test) = itAsync only name test
35−registerGroup (Pending name) = itPending name
36−registerGroup (Describe only name groups) =
37− describe only name (traverse_ registerGroup groups)
39−runMocha :: forall e. Spec e Unit
40− -> Eff (mocha :: MOCHA | e) Unit
41−runMocha spec = traverse_ registerGroup (collect spec)