summary refs log tree commit diff
path: root/lib/contains.test.fnl
diff options
context:
space:
mode:
authordozens2024-05-28 15:04:00 -0600
committerdozens2024-05-28 15:04:00 -0600
commitf265d24c0cacb92c7f7db19f364a155d87938184 (patch)
treea6e3ce61dee9020b79c8f2d8e3c91b51bc29e959 /lib/contains.test.fnl
inits
Diffstat (limited to 'lib/contains.test.fnl')
-rw-r--r--lib/contains.test.fnl11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/contains.test.fnl b/lib/contains.test.fnl
new file mode 100644
index 0000000..1c7fb06
--- /dev/null
+++ b/lib/contains.test.fnl
@@ -0,0 +1,11 @@
+(let [{: contains } (require :lib.contains)]
+  (let [given "a list and an element it contains"
+        should "returns true"
+        expected true
+        actual (contains [:apple :orange :pear] :apple)]
+    (assert (= actual expected) (.. "Given " given " should " should)))
+  (let [given "a list and an element it does not contain"
+        should "returns false"
+        expected false
+        actual (contains [:apple :orange :pear] :gorilla)]
+    (assert (= actual expected) (.. "Given " given " should " should))))