summary refs log tree commit diff
path: root/lib/keys.test.fnl
blob: 413a773083983558fbde01c4427908dcc0f27ea1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
(let [{: keys} (require :lib.keys)
      {: describe :end test-end} (require :lib.test)]
  (describe "keys()" (fn [t]
                       (let [input {:apple :red :banana :yellow}
                             actual (keys input)
                             sorted (table.sort actual) ;; SIDE EFFECT!!
                             ]
                         (t {:given "a table"
                             :should "returns a list of keys"
                             :expected [:apple :banana]
                             : actual})
                         (test-end)))))