9mm/lib/kvflip.test.fnl

14 lines
532 B
Plaintext
Raw Normal View History

(let [{: kvflip} (require :lib.kvflip)
2024-05-30 01:26:41 +00:00
{: describe :end test-end} (require :lib.test)]
(describe "kvflip()" (fn [t]
2024-05-30 01:26:41 +00:00
(let [input {:apple "red" :banana "yellow"}
expected {:red "apple" :yellow "banana"}
]
(t {:given "a table"
:should "kvflip that table!"
2024-05-30 01:26:41 +00:00
: expected
:actual (kvflip input)})
2024-05-30 01:26:41 +00:00
(test-end)))))