Liking cljdoc? Tell your friends :D

q.gadgets


callclj

(call f n)

Get the call map for the nth call

Get the call map for the nth call
sourceraw docstring

call-countclj

(call-count f)

The number of times the spied function has been called

The number of times the spied function has been called
sourceraw docstring

called-once?clj

(called-once? f)

Has the spied function been called once?

Has the spied function been called once?
sourceraw docstring

called-with?clj

(called-with? f args)

Has the spied function been called with these args?

Has the spied function been called with these args?
sourceraw docstring

called?clj

(called? f)

Has the spied function been called?

Has the spied function been called?
sourceraw docstring

callsclj

(calls f)

Returns a seq of call maps, one per call. Each map contains the keys :args and :return or :throw

Returns a seq of call maps, one per call.
Each map contains the keys :args and :return or :throw
sourceraw docstring

last-callclj

(last-call f)

Get the last call map

Get the last call map
sourceraw docstring

spyclj

(spy f)

wrap f, returning a new fn that keeping track of its call count and arguments

wrap f, returning a new fn that keeping track of its call count and arguments
sourceraw docstring

with-fakescljmacro

(with-fakes setup & body)

Takes a map of fn vars to fns. Replaces each fn with the new implementation and spies the stubbed-fn

Takes a map of fn vars to fns.
Replaces each fn with the new implementation and spies the stubbed-fn
sourceraw docstring

with-spiescljmacro

(with-spies setup & body)

Takes a vector of fn vars (vars that resolve to fns). Modifies the fn to track call counts, but does not change the fn's behavior

Takes a vector of fn vars (vars that resolve to fns). Modifies the
fn to track call counts, but does not change the fn's behavior
sourceraw docstring

with-stubscljmacro

(with-stubs setup & body)

Can either take a vector of fn vars, or a map of fn vars to return values. Replaces each fn with one that takes any number of args and returns nil or the mapped return value. Also spies the stubbed-fn

Can either take a vector of fn vars, or a map of fn vars to return values.
Replaces each fn with one that takes any number of args and returns nil or
the mapped return value. Also spies the stubbed-fn
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close