This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-03-04
Channels
- # aleph (2)
- # announcements (1)
- # biff (1)
- # calva (16)
- # cider (4)
- # clojure (45)
- # clojure-argentina (1)
- # clojure-europe (21)
- # clojure-nl (1)
- # clojure-norway (18)
- # clojure-uk (7)
- # clojurebridge (1)
- # clojurescript (3)
- # clr (3)
- # cursive (21)
- # datomic (4)
- # fulcro (4)
- # graalvm (3)
- # holy-lambda (8)
- # honeysql (22)
- # lsp (3)
- # malli (3)
- # nbb (1)
- # off-topic (3)
- # portal (13)
- # re-frame (3)
- # reagent (7)
- # releases (1)
- # shadow-cljs (1)
Hello. I'm trying to build a component testing environment. Here are the requirements I want, and things I've tried. • out team have a shadow-cljs + reagent project. • render reagent component • in real browser (no jsdom, happy-dom) • with @testing-library/user-event and promise • reliable watch mode! run tests on file save. (without manually evaluate (run-all-tests)
1. shadow cljs :target :browser-test a. i can't find the way to "run tests on file save" 2. karma! a. https://github.com/karma-runner/karma/?tab=readme-ov-file#karma-is-deprecated-and-is-not-accepting-new-features-or-general-bug-fixes 3. jest-cljs a. i want real browser 4. vitest browser mode + @testing-library/jest-dom a. how can i import cljs component and reagent from vite project? 5. https://github.com/lambdaisland/kaocha-cljs2/blob/main/doc/cljdoc.edn a. https://github.com/lambdaisland/kaocha-cljs2/issues/2
> i can't find the way to "run tests on file save" If you open the test web page generated by shadow-cljs itself, there will be hot reloading buit-in. Should also work with your own page if it runs tests on load or on hot reload (which can be done with a shadow-cljs hook).
it's watch mode runs before shadow-cljs hot reloadProbably because you have set it to watch the CLJS files. Instead, it should watch the compiled JS files.
Thank you for quick response. It's a good idea to look up the shadow-cljs hook documentation. When I looked up kaocha's document, kaocha watches the dependencies of source codes and namespaces (not the compiled results. it is initially built for clojure not cljs)
Can you recommend me an existing example repository or something?