diff options
author | dozens | 2024-05-29 19:26:41 -0600 |
---|---|---|
committer | dozens | 2024-06-02 21:44:17 -0600 |
commit | 7c07d6e6ececbf73e18a639e00b3690d4827e12a (patch) | |
tree | 7d948da1b634d100feb32215dd5d263c5b01ab8b /lib/tail.test.fnl | |
parent | f265d24c0cacb92c7f7db19f364a155d87938184 (diff) |
tests
Diffstat (limited to 'lib/tail.test.fnl')
-rw-r--r-- | lib/tail.test.fnl | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/tail.test.fnl b/lib/tail.test.fnl index 358b218..e507a0b 100644 --- a/lib/tail.test.fnl +++ b/lib/tail.test.fnl @@ -1 +1,19 @@ -;; TODO: test me +(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)))) |