Re: Custom test assertions in ClojureScript

2019-09-29 Thread Thomas Heller
Self-hosted should work the same way but it does require compiling the macro namespace in an extra step (ie. the $macros ns is created separately). I don't know how this is done for regular self-hosted. shadow-cljs has an extra build step for this that should take care of creating everything.

Re: Custom test assertions in ClojureScript

2019-09-28 Thread John Shahid
Thanks Thomas, That was very helpful. I tried your suggestion and it works in JVM ClojureScript. That method does not work on bootstrapped ClojureScript though. As far as I understand this is a result of bootstrapped ClojureScript evaluating the .clj(c) file in the same JavaScript

Re: Custom test assertions in ClojureScript

2019-09-28 Thread Thomas Heller
Hey, cljs.test/assert-expr is part of the CLJ macro side so it can't be extended from a CLJS REPL. You can write it in a .clj file and use (require-macros 'that.ns) from the CLJS REPL or use :require-macros in the ns form that uses the new assert-expr. HTH, Thomas On Thursday, September 26,

Custom test assertions in ClojureScript

2019-09-26 Thread John Shahid
Hi all, I am trying to implement custom assertions in ClojureScript. I tried to use defmethod but got the following error: > clojure -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version > "1.10.520"}}}' -m cljs.main --repl --repl-env node > cljs.user=> (require '[cljs.test]) > nil >