12 lines
439 B
Fennel
12 lines
439 B
Fennel
(let [{: head } (require :lib.head)]
|
|
(let [given "a lift of elements"
|
|
it "returns the first element of a list"
|
|
expected :apple
|
|
actual (head [:apple :orange :pear])]
|
|
(assert (= actual expected) (.. "Given " given " it " it)))
|
|
(let [given "an empty list"
|
|
it "returns an empty list"
|
|
expected 0
|
|
actual (length (head []))]
|
|
(assert (= actual expected) (.. "Given " given " it " it))))
|