I am testing a function in Clojure which takes a map as input and outputs a map to which the field :timestamp (current-timestamp)
is added.
I have problems testing for equality as I cannot predict which timestamp will be added by the function.
(is (= output (convert-map input)))
I thought about dissoc
-ing the :timestamp
from the output of the function but that seems convoluted, so I wonder if there is a better solution.
Aucun commentaire:
Enregistrer un commentaire