20 lines
859 B
Fennel
20 lines
859 B
Fennel
(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))))
|