This release comes with 73 new specs:
* + - assoc-in atom comp conj cons dec dedupe dissoc distinct every-pred find
flatten frequencies get-in group-by hash-map hash-set inc interpose into keep
keys last list max max-key min min-key next nil? not nth partition
partition-all partition-by peek pop re-find re-groups re-matcher re-matches
re-pattern re-seq rest select-keys seq shuffle some-fn subs update update-in
vals vec vector zipmap set/difference set/index set/intersection set/join
set/map-invert set/project set/rename set/rename-keys set/select set/subset?
set/superset? set/union string/ends-with? string/join string/starts-with?
Several existing specs were improved.
Speculative has a shiny new logo. See the README and logo directory.
speculative.instrumentNamespace speculative.instrument loads speculative.core, speculative.set
and speculative.string, so you don't have to. When loading this namespace,
specs that are not suited or useful for instrumentation are undefined. This
makes calling (stest/instrument) safe, since some specs can cause errors when
instrumented (e.g. hash-map on CLJ and apply and seq on CLJS).
This namespace also provides instrument and unstrument functions to only
i/unstrument specs provided by speculative.
To make testing easier, this namespace provides a clojure.test fixture that
wraps a test with speculative instrumentation.
Turning off specs that are not useful to instrument is beneficial for performance. Compare running the first 20 coal-mine test sets in CLJS on node:
Without instrumentation of some?, str, = and get:
"Elapsed time: 3198.731217 msecs"
With instrumentation of said functions:
"Elapsed time: 21343.952922 msecs"
respecedThe namespace speculative.test was promoted to a library called
respeced and therefore removed from
speculative.
Thanks to the contributors in this release:
clojure.set namespace.Additional thanks to Alex Miller (@puredanger) and Andy Fingerhut (@jafingerhut) for providing feedback on several issues.
= / apply assoc count every? filter first fnil get juxt map merge merge-with
not-any? not-every? range partial reduce remove reset! some some? str swap!
speculative.testNamespace speculative.test with tools around clojure.spec.test.alpha. More
info here.
Initial release with specs for map, filter, merge, merge-with, fnil
and reduce.
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |