This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-13
Channels
- # adventofcode (54)
- # aleph (1)
- # announcements (2)
- # aws (123)
- # babashka (1)
- # beginners (41)
- # calva (21)
- # cider (1)
- # clj-kondo (58)
- # cljdoc (4)
- # clojure (123)
- # clojure-austin (1)
- # clojure-belgium (6)
- # clojure-dev (11)
- # clojure-europe (33)
- # clojure-nl (1)
- # clojure-portugal (1)
- # clojure-uk (3)
- # clojurescript (20)
- # community-development (32)
- # conjure (1)
- # datomic (17)
- # etaoin (8)
- # events (1)
- # fulcro (1)
- # hyperfiddle (7)
- # malli (3)
- # nrepl (3)
- # off-topic (17)
- # other-languages (1)
- # polylith (4)
- # portal (7)
- # releases (3)
- # remote-jobs (1)
- # shadow-cljs (18)
- # test-check (24)
- # testing (3)
- # timbre (1)
- # xtdb (7)
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?
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
but clojure-spec
is to check structure / types of data, not for testing business logic?