2024-05-30 01:26:41 +00:00
|
|
|
(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))))
|