Spec: add more commonpractices
@practicalli-johnny is already working on this.
Since Sep 12, 2025.
Assessment
This issue has not been assessed yet.
Description
Update Practicalli Clojure spec section to include more common practices, especially in organising specs and Generative tests
https://practical.li/clojure/clojure-spec/organising-specs/
Commercial experiences
- Statsbomb (kafka)
- Griffin (db abstraction & generative testing)
- Billie (web)
Community
Where do you put the specs?
For domain, I prefer one or more namespaces dedicated to this (consider two layers - one for types, one for attributes) and included via :as-alias
For functions, in a foo.specs namespace
How do you validate the domain constructs? Via pre-/postconditions, within the functions via s/valid?, with s/fdefs and instrumentation or with custom validators?
s/valid? for data validation from public inputs
s/fdef / instrumentation for tests of functions
How do you report spec failures? Just the error or with explain or expound?
for internal stuff, probably s/explain
for public stuff, consider expound or custom
Do you validate at dev-time only or also in production?
for user-side inputs, production
for catching your own programming errors, dev-time only
What libs/tools do you use other than plain spec?
test.chuck
- Dominant language
- Makefile
- Stars
- 117
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from practicalli/clojure
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
practicalli/clojure#381 ·
-
Clojure on windows Open
Difficulty 1/5 Under an hour Newbie friendliness 75/100
practicalli/clojure#298 ·
-
video
practicalli/clojure#478 · 1 assignee ·
-
practicalli/clojure#476 · 1 assignee ·
-
practicalli/clojure#474 · 1 assignee ·