9mm/lib/flip.test.fnl

14 lines
522 B
Fennel

(let [{: flip} (require :lib.flip)
{: describe :end test-end} (require :lib.test)]
(describe "flip()" (fn [t]
(let [input {:apple "red" :banana "yellow"}
expected {:red "apple" :yellow "banana"}
]
(t {:given "a table"
:should "flip that table!"
: expected
:actual (flip input)})
(test-end)))))