From f265d24c0cacb92c7f7db19f364a155d87938184 Mon Sep 17 00:00:00 2001 From: dozens Date: Tue, 28 May 2024 15:04:00 -0600 Subject: inits --- lib/contains.test.fnl | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 lib/contains.test.fnl (limited to 'lib/contains.test.fnl') 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)))) -- cgit 1.4.1-2-gfad0