Skip to content

Instantly share code, notes, and snippets.

View cddr's full-sized avatar

Andy Chambers cddr

View GitHub Profile
@cddr
cddr / ns.clj
Created April 16, 2020 08:40
Enumerate parameters permitted by some clojure spec
(ns scratch.ns
(:require
[clojure.spec.alpha :as s]))
(s/def ::foo string?)
(s/def ::bar string?)
(s/def ::baz string?)
(s/def ::yolo (s/keys :req-un [::foo ::bar]
:opt-un [::baz]))
[diff "clj"]
xfuncname = "^(\\((def|ns)([^\\[])*).*$"
(ns kafka.test-helpers
"Here, we define a simpler version of jackdaw's test-machine
Tries to capture the two essential features of jackdaw via
a simple functional interface rather than having to learn a
whole new data format to write tests.
See `journal`/`with-journal` and `wait-for` for the main
entrypoints to this ns.