4import Control.Monad.Eff (Eff)
5import Control.Monad.Eff.Class (liftEff)
6import Control.Monad.Eff.Console (CONSOLE)
7import Data.Maybe (Maybe(..), fromJust)
8import Data.String (length)
9import Data.UUID (parseUUID, genUUID, GENUUID)
10import Node.Process (PROCESS)
11import Partial.Unsafe (unsafePartial)
12import Test.Spec (it, describe)
13import Test.Spec.Assertions (shouldEqual)
14import Test.Spec.Reporter.Console (consoleReporter)
15import Test.Spec.Runner (run)
17main :: forall e. Eff (uuid :: GENUUID, console :: CONSOLE, process :: PROCESS | e) Unit
18main = unsafePartial $ run [consoleReporter] do
19 describe "Data.UUID" do
20 it "`genUUID` returns a uuid" do
21 uuid <- liftEff genUUID
22 (length <<< show) uuid `shouldEqual` 36
24 it "`parseUUID` parses a valid uuid as Just UUID" do
25 let uuidStr = "d0778cf2-3a4c-42ef-acbd-1269b6bec204"
26 uuid = parseUUID uuidStr
27 uuidStr `shouldEqual` (show $ fromJust uuid)
29 it "`parseUUID` parses an invalid uuid as Nothing" do
31 uuid = parseUUID uuidStr
32 Nothing `shouldEqual` uuid
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list