testing

danielcompton 2024-12-03T21:20:33.182439Z

@taehee.kim do you have any sample code of how you setup Vitest with ClojureScript?

κΉ€νƒœν¬(taehee kim) 2024-12-04T03:56:34.545479Z

Luckily, it's "yes." https://github.com/taehee-sp/reagent-vitest-testing-lib

κΉ€νƒœν¬(taehee kim) 2024-12-04T03:57:40.970179Z

but it's bit old. I will update it soon

danielcompton 2024-12-04T03:58:28.503589Z

Nice, thanks! Do you still recommend using vitest with CLJS?

κΉ€νƒœν¬(taehee kim) 2024-12-04T03:59:49.686749Z

Yes. I use it in production. It's still awesome. :)

κΉ€νƒœν¬(taehee kim) 2024-10-18T05:29:23.113049Z

I would recommend Playwright (it's good). We're also using Vitest browser mode for ClojureScript frontend. However, it's generally not a good idea to check backend internal state from E2E/integration tests (in most cases). You can just assert user-facing get/read/query views like list or detail pages after post/create/mutation actions. If you're interested in testing the backend in isolation, there are many traditional options. Just use deftest or polylith-kaocha, polylith-external-test-runner, etc. There are good books on testing (with functional programming understanding) like "Unit Testing Principles, Practices, and Patterns". Functional programming is also being accepted by object-oriented and test advocates. They are increasingly understanding functional customs and integrating them with their traditions.

πŸ‘ 1
πŸ™ 1