Fork me on GitHub
#reagent
<
2024-04-07
>
김태희(taehee kim)08:04:18

Hello~ I'm here to share my reagent + vitest + @testing-library component testing setup. So far, it is just the actual code I'm using in my work. But I'm going to share it as a more organized and advanced library in the future. (There should be a semantic version at that time.) https://github.com/taehee-sp/reagent-vitest-testing-lib/tree/main

👍 5
김태희(taehee kim)08:04:34

(it
  "click counter then 1 up : siheom"
  (run-siheom
    (render [counter])
    (click! (query "button" "click: 0"))
    (click! (query "button" "click: 1"))
    (visible? (query "button" "click: 2")))))

김태희(taehee kim)08:04:54

you can run component tests in real browsers, with watch mode.

김태희(taehee kim)04:04:08

Video of our actual test run