Fork me on GitHub

cljs.test is not running assertions coded in the following form:

(defn impl [...]
  (testing ""

(deftest all-cases
  (doseq [...]
    (impl ...)))
It runs the deftest, but it reports 0 assertions. What's a better way to run tests in a loop? Note that: - I'm using the async macro - I'm exercising combinatorial cases, "code it by hand" not an ideal option


is it possible to get clients to interact independent of server through js / cljs ?


@theasp cljs versus clj ... web app. So you mean a CLJ server in both cases but a CLJS clientside versus the static html served and plain old js object being loaded?


I've been doing some research on clojurescript's bootstrapping, and i'm still missing some things. In order to bootstrap clojurescript and self-host it on a website to compile clojurescript code, do you need to build cljs-bootstrap? Is the library not included in a clojar?


Just some food for thought, I was also wondering why we don't see something similar to how coffeescript works. If you include a certain file directly in your webpage, it will look for <script> tags including a certain type ie. type="coffeescript" and compile it into javascript without having to build it first. Is something like this possible for clojurescript, or is it limited by the google closure compiler? I feel like it would be pretty useful for development, or for people to just try out the language without having to resort to using a build system. Although, i'd say clojurescript self-hosting has come an incredible way so far.


For debugging, I'm looking for a quick way to convert a DOM node into an HTML string.


@deg (.-outerHTML node)


@benzap You don't need any external dependency in order to use self-hosted ClojureScript—just make use of the cljs.js namespace.


Is anyone able to get to a CORS-enabled site such as “” from a CLJS client running on a browser? I am using cljs-http with code like:


`(client/get uri
  {:async? true}
  (fn [response]
    (println :xhr-response (:status response) (keys response) uri))
  (fn [exception]
    (println :xhr-error exception)))


That gives an error in the console like

`The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. Origin 'null' is therefore not allowed access. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.


If I add “:with-credentials? false” I get no error in the console but neither callback fires.


Will try raw google closure xmlhttprequest next to see what that turns up, but any tips are welcome.


What do people do with CSS for front-end development (Reagent, Rum etc)? Something that supports Autoprefixer, PostCSS etc would be nice. I know in React that CSS-in-JS is popular but I have only used CSS Modules with React. Should I use Garden?


@rauh I saw your announcement for Hicada that seesm to support "inline CSS", is that using Garden? Are you planning on doing a write-up on that soon? Sounds interesting


@mail228 Not anytime soon, no. Check out the last few commits of @roman01la’s prum. He uses hicada + his cljss ( ) to do some inline css.

Roman Liutikov14:01:37

@mail228 @rauh is right, I’m maintaining one CSS-in-CLJS library, similar to Emotion.js, for ClojureScript. AFAIK a couple of people use it in production, but it is still somewhat limited (support for Media Queries just landed yesterday and still a WIP) Take a look at it, maybe it will fit your needs


Thanks, I had my eyes on that as well. New to this environment so trying to get an overview of what people are using and what's available. Does it support stuff like PostCSS/Autoprefixer?

Roman Liutikov14:01:39

@mail228 no, I don’t have plans on adding vendor prefixing, the library is using CSS Variables to update dynamic styles which means that the output CSS support is already limited to newer browsers (IE 11 and older are not supported)


That's fair, luckily I'm not trying to support older browsers, just the newest so that works. On production build does it then extract it to a .css file for caching like the webpack plugin?

Roman Liutikov14:01:50

@mail228 No. I was doing that in the early versions, but then got rid of this functionality, bc it doesn’t allow to eliminate unused CSS at compile time. Also the implementation is a bit hacky with macros.


I will definitely check it out, think it fits my needs

Roman Liutikov14:01:14

@mail228 don’t hesitate to open an issue if you find any problems, I’m sure there are quite a few bugs 🙂


Just found a hyper-relevant issue on cljs-http. Checking….


Never mind, I am an idiot:tried treating cljs-http as if it were clj-http. 😊


using js/ReactDates.DateRangePicker (not Controller) here, works well


yes we also use it, and it works. The problem is that it has the input field (which once clicked 'dropdowns' the calendar). We want the calendar also opened with no input field, which is what DayPickerRangeController is supposed to do

Roman Liutikov17:01:28

@tomaas are you sure attribute names should be kebab-cased and not cameCased, since its interop with JS components?


Has anybody ever used wallaby.js with clojurescript?