Fork me on GitHub
Jaime Sangcap20:06:14

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


We use react-testing-library at work with helix


I would recommend it

👍 2
Jaime Sangcap19:06:41

Cool. Enjoying it so far 🙂

Jaime Sangcap19:06:43

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

(ns limeray.web.simulate
   ["@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))


i prefer to use rtl directly


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

Jaime Sangcap20:06:54

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