Sha256: cd7e41b5173c44e83843ca850997e3a7950bf6c57bf971f5edb4ea0c0879dcc6

Contents?: true

Size: 926 Bytes

Versions: 141

Compression:

Stored size: 926 Bytes

Contents

module Test.Main where

import Prelude
import Control.Monad.Eff (Eff)
import Control.Monad.Eff.AVar (AVAR)
import Control.Monad.Eff.Console (CONSOLE)
import Test.Unit (TestSuite, suite, test)
import Test.Unit.Console (TESTOUTPUT)
import Test.Unit.Main (runTest)
import Test.Unit.Assert as Assert
import Data.Maybe (Maybe(Just, Nothing))
import HelloWorld (helloWorld)

main :: forall eff
  . Eff ( avar :: AVAR
        , console :: CONSOLE
        , testOutput :: TESTOUTPUT
        | eff                     
        )
        Unit
main = runTest suites

suites :: forall e. TestSuite e
suites = do
  suite "HelloWorld.helloWorld" do
    test "Hello with no name" do
      Assert.equal "Hello, World!" (helloWorld Nothing)
    test "Hello to a sample name" do
      Assert.equal "Hello, Alice!" (helloWorld (Just "Alice"))
    test "Hello to another sample name" do
      Assert.equal "Hello, Bob!" (helloWorld (Just "Bob"))

Version data entries

141 entries across 141 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/purescript/exercises/hello-world/test/Main.purs
trackler-2.2.1.179 tracks/purescript/exercises/hello-world/test/Main.purs
trackler-2.2.1.178 tracks/purescript/exercises/hello-world/test/Main.purs
trackler-2.2.1.177 tracks/purescript/exercises/hello-world/test/Main.purs
trackler-2.2.1.176 tracks/purescript/exercises/hello-world/test/Main.purs
trackler-2.2.1.175 tracks/purescript/exercises/hello-world/test/Main.purs
trackler-2.2.1.174 tracks/purescript/exercises/hello-world/test/Main.purs
trackler-2.2.1.173 tracks/purescript/exercises/hello-world/test/Main.purs
trackler-2.2.1.172 tracks/purescript/exercises/hello-world/test/Main.purs
trackler-2.2.1.171 tracks/purescript/exercises/hello-world/test/Main.purs
trackler-2.2.1.170 tracks/purescript/exercises/hello-world/test/Main.purs
trackler-2.2.1.169 tracks/purescript/exercises/hello-world/test/Main.purs
trackler-2.2.1.167 tracks/purescript/exercises/hello-world/test/Main.purs
trackler-2.2.1.166 tracks/purescript/exercises/hello-world/test/Main.purs
trackler-2.2.1.165 tracks/purescript/exercises/hello-world/test/Main.purs
trackler-2.2.1.164 tracks/purescript/exercises/hello-world/test/Main.purs
trackler-2.2.1.163 tracks/purescript/exercises/hello-world/test/Main.purs
trackler-2.2.1.162 tracks/purescript/exercises/hello-world/test/Main.purs
trackler-2.2.1.161 tracks/purescript/exercises/hello-world/test/Main.purs
trackler-2.2.1.160 tracks/purescript/exercises/hello-world/test/Main.purs