tracks/purescript/exercises/word-count/test/Main.purs in trackler-2.2.1.37 vs tracks/purescript/exercises/word-count/test/Main.purs in trackler-2.2.1.38
- old
+ new
@@ -1,17 +1,29 @@
module Test.Main where
import Prelude
import Test.Unit.Assert as Assert
import Control.Monad.Eff (Eff)
+import Control.Monad.Aff.AVar (AVAR)
+import Control.Monad.Eff.Console (CONSOLE)
import Data.StrMap (fromFoldable)
import Data.Tuple (Tuple(..))
-import Test.Unit (suite, test)
+import Test.Unit (TestSuite, suite, test)
+import Test.Unit.Console (TESTOUTPUT)
import Test.Unit.Main (runTest)
import WordCount (wordCount)
-main :: Eff _ Unit
-main = runTest do
+main :: forall eff
+ . Eff ( avar :: AVAR
+ , console :: CONSOLE
+ , testOutput :: TESTOUTPUT
+ | eff
+ )
+ Unit
+main = runTest suites
+
+suites :: forall e. TestSuite e
+suites = do
suite "WordCount.wordCount" do
test "count one word" $
Assert.equal (fromFoldable [Tuple "word" 1])
(wordCount "word")