2024-05-30 01:26:41 +00:00
|
|
|
(let [{: tail} (require :lib.tail)
|
|
|
|
{: describe :end test-end} (require :lib.test)]
|
|
|
|
(describe "tail()" (fn [t]
|
|
|
|
(t {:given "a list"
|
|
|
|
:should "return it minus the head"
|
|
|
|
:expected [:apple :pear]
|
|
|
|
:actual (tail [:orange :apple :pear])
|
|
|
|
})
|
|
|
|
(t {:given "a single item list"
|
|
|
|
:should "return empty list"
|
|
|
|
:expected []
|
|
|
|
:actual (tail [:orange])
|
|
|
|
})
|
|
|
|
(t {:given "an empty list"
|
|
|
|
:should "return empty list"
|
|
|
|
:expected []
|
|
|
|
:actual (tail [])
|
|
|
|
})
|
|
|
|
(test-end))))
|