dimanche 9 février 2020

Is there any way to mock a function in clojure?

Is there any way to mock a function in clojure. For example I have this function: (defn a [x] (utils/count x)) I need to write a test, but I do not know how to mock the utils/count (for example). what if I have several functions inside the same function and I need to test it? (defn a [x] (utils/count x) (utils/count2 x) (test/other x))

Aucun commentaire:

Enregistrer un commentaire