diff options
Diffstat (limited to 'lib/head.test.fnl')
-rw-r--r-- | lib/head.test.fnl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/head.test.fnl b/lib/head.test.fnl new file mode 100644 index 0000000..7514121 --- /dev/null +++ b/lib/head.test.fnl @@ -0,0 +1,11 @@ +(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)))) |