5import Data.Maybe (Maybe(..), fromJust)
6import Data.String (length)
7import Data.UUID (genUUID, parseUUID)
9import Effect.Unsafe (unsafePerformEffect)
10import Partial.Unsafe (unsafePartial)
11import Test.Spec (it, describe)
12import Test.Spec.Assertions (shouldEqual)
13import Test.Spec.Reporter.Console (consoleReporter)
14import Test.Spec.Runner (run)
17main = run [consoleReporter] do
21 it "`genUUID` returns a uuid" do
22 let uuid = unsafePerformEffect genUUID
23 (length <<< show) uuid `shouldEqual` 36
25 it "`parseUUID` parses a valid uuid as Just UUID" do
26 let uuidStr = "d0778cf2-3a4c-42ef-acbd-1269b6bec204"
27 uuid = parseUUID uuidStr
28 uuidStr `shouldEqual` (show $ unsafePartial $ fromJust uuid)
30 it "`parseUUID` parses an invalid uuid as Nothing" do
32 uuid = parseUUID uuidStr
33 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