cursive-ide / cursive

Cursive: The IDE for beautiful Clojure code
582 stars 7 forks source link

Clojurescript testing #503

Open wilkerlucio opened 10 years ago

wilkerlucio commented 10 years ago

Hi

I'm starting to do some testing in ClojureScript, and just using the ClojureScript test: https://github.com/cemerick/clojurescript.test

I can run the REPL and just run my tests with (t/test-ns 'your.ns) and works fine, but would be great to have the same support for running tests that we already have on Clojure.

There is plans to support clojurescript.test? Is there anything that we can do to help with that? I would really love to have this feature, but I understand if it's not really a priority now.

Thanks.

cursive-ide commented 10 years ago

Yes, I'm definitely planning to support this, especially since it's (as far as I know) the only game in town for CLJS testing. I haven't looked at what is involved yet though, I don't know how cljs.test works - I suspect it's somewhat different to clojure.test because cljs has no vars at runtime. I'll need to add at least some rudimentary support for CLJS REPLs before this, though.

malchmih commented 10 years ago

Speclj (https://github.com/slagyr/speclj/) also covers cljs testing. And it is rather popular for clj testing.

sfnelson commented 9 years ago

Clojurescript now has official built-in testing via cljs.test, which provides all the macros we know and love from clojure.test (deftest, is, testing etc). It would be great to have symbol resolution for cljs.test/deftest in clojurescript.

ricardojmendez commented 9 years ago

+1. I wish Github has a voting feature.

eploko commented 8 years ago

I'm curious what exactly happens in Cursive when one hits Tools → REPL → Run tests in current NS in REPL. I have a ClojureScript REPL running fine inside Cursive, but then the only thing that happens when I run the above command in a test NS is:

Loading test/my/project/somemodule_test.cljs... Compiling /Users/me/prj/test/my/project/somemodule_test.cljs

...and nothing else happens. This works fine for a Clojure test NS, but not for ClojureScript.

Any hints/ideas on how to fix this, anyone, pls?

eploko commented 8 years ago

On a second thought, it occurs to me that the output of the tests should go to the browser console and not to the REPL window in Cursive. Please disregard the comment above.

joekiller commented 7 years ago

FYI to run tests now in the repl using figwheel you do something like:

(cljs.test/run-tests 'namespace.test.mytest)