helix

https://github.com/Lokeh/helix
jaime 2020-06-18T20:14:14.260400Z

Hi, I'm currently evaluating react-testing-library to test helix components. I wonder what testing framework/lib do you use?

lilactown 2020-06-18T20:36:36.260900Z

We use react-testing-library at work with helix

lilactown 2020-06-18T20:36:44.261200Z

I would recommend it

👍 2
jaime 2020-06-24T19:18:41.269600Z

Cool. Enjoying it so far 🙂

jaime 2020-06-24T19:42:43.269800Z

Do you wrap the RTL functions like below? Or just using RTL directly on every test namespaces

(ns limeray.web.simulate
  (:require
   ["@testing-library/react" :as rtl :refer [fireEvent]]
   [cljs-bean.core :refer [->js]]))

(defn change [element event] (.change fireEvent element (->js event)))
(defn click [element] (.click fireEvent element))

lilactown 2020-06-24T19:47:23.270300Z

i prefer to use rtl directly

lilactown 2020-06-24T19:47:54.271Z

creating a wrapper ends up just being a bunch of extra, undocumented code that I need to maintain

jaime 2020-06-24T20:15:54.271200Z

I agree. I'm also thinking to just go all in 🙂

jaime 2020-06-24T20:16:00.271400Z

Thanks!