Fork me on GitHub
#testing
<
2022-12-13
>
Tema Nomad07:12:07

What to test in API+SPA application? Lets say we have clojure API (typical CRUD) and clojurescript SPA on reagent+re-frame I wrote this article https://github.com/day8/re-frame/blob/master/docs/Testing.md Am I right in this case the good testing architecture will be: 1. Backend: API points tests via clojure.test 2. Frontend: Re-frame event tests, Re-frame subs tests, UI tests via testing-library or something else like Jest What do you test in your API+SPA application?

nbardiuk08:12:32

I would also add clojure-spec or mali to check/generate shape of API requests and responses. Backend uses request spec to generate random request and response spec to validate response. Something similar for frontend. Specs will improve API documentation or can be used to generate swagger

Tema Nomad08:12:34

but clojure-spec is to check structure / types of data, not for testing business logic?