Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run tests? #71

Closed
thiagofm opened this issue Jul 4, 2015 · 4 comments
Closed

How to run tests? #71

thiagofm opened this issue Jul 4, 2015 · 4 comments
Labels

Comments

@thiagofm
Copy link
Contributor

thiagofm commented Jul 4, 2015

So, I've create previously a issue asking how, and still didn't managed to.

I've been playing and wrote: https://github.com/thiagofm/smartyper (check it out, should be fun to see one of your babies in action!)

I'm using this reagent template. It's said that I should be able to run clojurescript tests from inside the repl(I need that). Whenever I run lein figwheel, I get:

cljs.user=>

I try to switch to a namespace that contains the test that I want to run, I switch using the function in-ns. I can't call any functions there. But clojure doesn't tell me if this namespace exists or not. Also, I couldn't find a way to check if this namespace is existent.

I promise that once I figure that thing out, I'll contribute back to the community by actually teaching people how to do that.

Can you give me a hand? I currently see a lot of clojure videos in youtube but there's basically no video of somebody working with clojurescript, writing tests and stuff that I usually do in my workflow in another programming language.

@yogthos
Copy link
Member

yogthos commented Jul 4, 2015

You would try using the Figwheel nREPL, I wrote a walkthrough about that here.

@yogthos
Copy link
Member

yogthos commented Jul 4, 2015

also just tried smartyper nice project ;)

@thiagofm
Copy link
Contributor Author

thiagofm commented Jul 4, 2015

Ok, I've discovered what was the problem. It's actually my smartype.core-test that isn't getting loaded. Other modules work fine. Sorry 👎

How do I load all tests files inside figwheel? Is there any easy way to do that? A special namespace?

@Whoops
Copy link
Member

Whoops commented Jul 5, 2015

Just a guess from reading this (https://nvbn.github.io/2015/06/08/cljs-test/) and looking at your project.clj, but I think the issue might be that your tests are not included in your apps source-paths, but instead have their own separate build configuration. You I think you might have to include them for the namespace to be available on the REPL. If not, it might be worth asking on the Figwheel project as well, since it's probably not specific to this template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants