(->clj datum)
Recursively transform JS arrays into cljs vectors, and JS objects into cljs maps, otherwise resulting data structure will be untouched. We need this in order to compare for equality 'actual' JS arrays or objects, with 'expected' ones in assertions.
Recursively transform JS arrays into cljs vectors, and JS objects into cljs maps, otherwise resulting data structure will be untouched. We need this in order to compare for equality 'actual' JS arrays or objects, with 'expected' ones in assertions.
(cljs-env? env)
Take the &env from a macro, and tell whether we are expanding into cljs. Source: http://blog.nberger.com.ar/blog/2015/09/18/more-portable-complex-macro-musing
Take the &env from a macro, and tell whether we are expanding into cljs. Source: http://blog.nberger.com.ar/blog/2015/09/18/more-portable-complex-macro-musing
(deftest & args)
Source: http://blog.nberger.com.ar/blog/2015/09/18/more-portable-complex-macro-musing
(equal-eg? x y)
Create a two args version of '=, so that we don't override or be overriden by libraries dispatching on '= for clojure.test/assert-expr, and to apply our custom clojure.test/assert-expr only to function tests, i.e., not expression tests.
Create a two args version of '=, so that we don't override or be overriden by libraries dispatching on '= for clojure.test/assert-expr, and to apply our custom clojure.test/assert-expr only to function tests, i.e., not expression tests.
(equal-ex? x y)
The same as 'equal-eg?', but to be used for expression tests.
The same as 'equal-eg?', but to be used for expression tests.
(explain-data & args)
By wrapping spec/explain-data inside this function, prevents the macro using this code from expanding the wrong version of explain-data - clojure.spec.alpha/explain-data.
By wrapping spec/explain-data inside this function, prevents the macro using this code from expanding the wrong version of explain-data - clojure.spec.alpha/explain-data.
(if-target-is-cljs then & [else])
Return then if we are generating cljs code and else for Clojure code. Source: http://blog.nberger.com.ar/blog/2015/09/18/more-portable-complex-macro-musing
Return then if we are generating cljs code and else for Clojure code. Source: http://blog.nberger.com.ar/blog/2015/09/18/more-portable-complex-macro-musing
(invalid-spec? & args)
Complement of valid-spec? to able a distinct dispatch fn arg in clojure.test/assert-expr.
Complement of valid-spec? to able a distinct dispatch fn arg in clojure.test/assert-expr.
(is & args)
Source: http://blog.nberger.com.ar/blog/2015/09/18/more-portable-complex-macro-musing
(pred-eg arg)
Meant to be used as a clojure.test/assert-expr dispatch value which is a predicate 'eg' checker.
Meant to be used as a clojure.test/assert-expr dispatch value which is a predicate 'eg' checker.
(pred-ex arg)
Same as 'eg', but called from an expression test.
Same as 'eg', but called from an expression test.
(valid-expected-spec-ex? & args)
Same as 'valid-expected-spec?'
Same as 'valid-expected-spec?'
(valid-expected-spec? & args)
Play fairly with other libraries dispatching with clojure.spec.alpha/valid? for clojure.test/assert-expr.
Play fairly with other libraries dispatching with clojure.spec.alpha/valid? for clojure.test/assert-expr.
(valid-spec? & args)
Solves a clojure.spec.alpha/valid? resolve issue in cljs JVM. Check client code for use cases.
Solves a clojure.spec.alpha/valid? resolve issue in cljs JVM. Check client code for use cases.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close