babashka / sci.configs

A collection of ready to be used SCI configs
https://babashka.org/sci.configs/
Other
19 stars 17 forks source link

Fix ns to string bug in cljs.test/run-all-tests #22

Closed jaidetree closed 10 months ago

jaidetree commented 10 months ago

I've got a namespace in my classpath called "gracie.projects2" with a filepath like src/gracie/projects2.cljs. I have code based on your testing example:

(t/run-all-tests #"^gracie\.tests\.") 

Running it throws the following error:

Doesn't support name: gracie.projects2

Digging around the clojuredocs.org docs for all-ns, found a user exploring all-ns like the following:

(->> (all-ns)
     (map ns-name)
     (map name))

That seems to work more reliably for getting the string name of all the namespaces.

Quick test to confirm:

(->> (all-ns)
     (map name))

Throws that error described above.

(->> (all-ns)
     (map ns-name)
     (map name))

Works as expected returning a list of string namespace names.

borkdude commented 10 months ago

Thank you!