18 lines
867 B
Fennel
18 lines
867 B
Fennel
(let [{: contains } (require :lib.contains)
|
|
{: describe } (require :lib.test)
|
|
{: describe :end test-end} (require :lib.test)
|
|
]
|
|
|
|
(describe "contains()" (fn [t]
|
|
(t {:given "a list and an element it contains"
|
|
:should "returns true"
|
|
:expected true
|
|
:actual (contains [:apple :orange :pear] :apple)}
|
|
)
|
|
(t {:given "a list and an element it does not contain"
|
|
:should "returns false"
|
|
:expected false
|
|
:actual (contains [:apple :orange :pear] :gorilla)
|
|
})
|
|
(test-end))))
|