reagent

김태희(taehee kim) 2024-03-09T03:25:55.658229Z

success! shadow-cljs watch esm build + vitest, @testing-library

김태희(taehee kim) 2024-03-09T03:26:55.312509Z

I'm going to share my settings with minimal repository. ^^

👍 2
Lari Saukkonen 2024-03-12T07:20:45.316589Z

Interested!

🙌 1
olecve 2024-04-04T11:35:00.778549Z

@taehee.kim I was just wondering if you had time to create a repository with the settings?

김태희(taehee kim) 2024-04-04T12:04:00.993439Z

Haha it's true. But our CTO appreciate the idea. It can be this weekend...

olecve 2024-04-04T12:06:39.685859Z

Great news. Looking forward to checking it out 👍

김태희(taehee kim) 2024-04-04T12:34:22.122139Z

Now we call it "siheom" (시험, the Korean word for test)

olecve 2024-04-04T12:36:15.865659Z

That looks nice!

김태희(taehee kim) 2024-04-04T12:36:18.554539Z

Playwright like testing-library wrapper. No manual await. No get vs query vs find. Just role and name. Test as data

👍 1
김태희(taehee kim) 2024-04-04T12:37:46.288489Z

We use vitest but you can use it with any test library.

olecve 2024-04-04T12:38:36.340549Z

I would like to try vitest, but I can’t find the way to configure it with reagent.

김태희(taehee kim) 2024-04-04T12:39:09.249329Z

I just compile cljs into esm with shadow-cljs watch

👍 1
olecve 2024-04-04T12:39:21.507469Z

At the moment I use karma with my small wrapper on top of react-testing-library https://github.com/olecve/react-testing-library-cljs

김태희(taehee kim) 2024-04-04T12:39:25.209009Z

And vitest watch the compile output

olecve 2024-04-04T12:39:28.299689Z

but not super happy with karma test runner

김태희(taehee kim) 2024-04-04T12:40:20.648209Z

I use vitest browser mode. It is fast and we don't need browser api mocking (history, media query etc...)

김태희(taehee kim) 2024-04-04T12:40:57.184539Z

We run 20 component tests in 2.4s (m2 mac)

👍 1
olecve 2024-04-04T12:41:35.965009Z

Is “siheom” something you use internally or is it available as a library?

김태희(taehee kim) 2024-04-04T12:42:00.168429Z

Internally. But we will publish it as an open source library

김태희(taehee kim) 2024-04-04T12:42:26.455709Z

As I said, our CTO wants to contribute to clojure ecosystem.

olecve 2024-04-04T12:43:37.264569Z

Oh, I was a bit confused. I thought you were talking about the project with the test configuration example.

김태희(taehee kim) 2024-04-04T12:43:56.964449Z

Oh okay.

김태희(taehee kim) 2024-04-04T12:44:12.327299Z

I will share my vitest and testing library setup this weekend (probably)

김태희(taehee kim) 2024-04-04T12:44:22.965249Z

We will share our library soon.

olecve 2024-04-04T12:44:55.795899Z

Yeah, I really like that the code looks similar to playwright 👍 I’ll it give a try for sure 🙂

👍 1