Fork me on GitHub
#clojurescript
<
2018-06-20
>
giovaferra12:06:13

Hi every one! I was looking for a tool that performs test-coverage in clojurescript that targets nodejs. I have searched on google but I have found nothing: is there such an instrument or I have to use tools already provided for javascript such as istanbuljs/nyc? Thanks!

delaguardo13:06:38

You can use doo as your test runner which comes with istanbul support - https://github.com/bensu/doo#measuring-coverage-with-istanbul

giovaferra13:06:57

Doo can be used with karma framework that integrates Istanbull. Karma is used to target browsers, while my project targets Nodejs, I don't know if I can use Karma anyway.. :thinking_face:

henryw37414:06:00

Hi all. Does anyone know why the equivalent of clojure.core/extend is not in cljs? And could it be etc? Sorry if this question has come up before... I failed to Google it. Thanks

Oliver George05:06:02

This example of extend-type might help

henryw37407:06:43

Hi Oliver, thanks for the reply but I don't see how that would help me? I am asking specifically about https://clojuredocs.org/clojure.core/extend not being in cljs

maleghast16:06:30

Anyone who wants to submit a talk proposal for Clojure eXchange 2018, the link is here - just scroll up a bit to find the Google Form embedded in the page: https://skillsmatter.com/conferences/10459-clojure-exchange-2018#get_involved

flyboarder17:06:45

Hoplon Code Walkthrough happening in #hoplon

folcon18:06:56

Is there a reason re-groups isn’t in cljs? I’ve managed to reimplement it sufficiently for my purposes, but I’m curious as it’s in clojure.core.

mfikes18:06:26

@folcon My speculation would be that, in Clojure, it is defined to take and return Java-specific classes, so there is no direct translation to ClojureScript.

folcon18:06:34

That may be the case, I was just puzzled as other regex parts exist, such as re-matches and re-find.

mfikes18:06:57

Right, re-matches and re-find take and return primitives that exist in Clojure and ClojureScript.

mfikes18:06:51

Acutally, cljs.core/re-find omits the single-arity version, probably for the same rationale.

folcon18:06:05

Interesting. Thanks, you might be right :)…

kennytilton20:06:47

Background: building CLJS app with figwheel, getting “Use of undeclared Var cljs.reader/read-string”. Seems benign because the call works. Is there anyway to suppress that warning? I hate warnings. 🙂

kennytilton20:06:04

Oh wow: “Figwheel: Not loading code with warnings - public/js/out/aghire/user_annotations.js”. Say it ain’t so!!! 🙂

Alex20:06:41

@hiskennyness It works because cljs.reader is accidentally loaded by some other namespace in your program. If you add (require [cljs.reader]) it will resolve the warning and also mean that your namespace will work even if something else doesn't load cljs.reader

Alex20:06:38

It also affords you the opportunity to alias the namespace (e.g. (require [cljs.reader :as reader])) so that you don't have to invoke read string with the full namespace (reader/read-string ...) vs (cljs.reader/read-string ...)

kennytilton20:06:46

Wow, @aredington_clojurians! I cannot believe I never ran into this before. Thx!

👍 4