planck

Planck ClojureScript REPL
2018-01-09T00:00:37.000157Z

tree . └── src └── tsp ├── core.cljs └── testcore.cljs

mfikes 2018-01-09T00:00:54.000053Z

Does anything load 'tsp.testcore?

2018-01-09T00:01:25.000208Z

oh do you mean you have to load tsp.testcore into repl first?

2018-01-09T00:02:25.000322Z

doh! cheers

mfikes 2018-01-09T00:02:48.000013Z

Yes @gas, something needs to first load that namespace so that the tests it defines are loaded

mfikes 2018-01-09T00:03:27.000160Z

In sort (cljs.test/run-tests 'tsp.testcore) only runs the tests. (It doesn't load the namespace represnted by the symbol passed.)

mfikes 2018-01-09T00:04:17.000402Z

Following that example, if you happen to find that a test itself needs to be revised to correct it, then (require 'tsp.testcore :reload)

mfikes 2018-01-09T00:04:54.000006Z

And if the namespace(s) that the test namespace is testing have changed on disk: (require 'tsp.testcore :reload-all)

2018-01-09T00:04:54.000131Z

right because of the macros - mayb on your docs on testing would be good to explain that as test use macros they need loading so to run the test form repl you need to load the test namespace beforehand..

mfikes 2018-01-09T00:06:01.000275Z

Yeah, perhaps. It is difficult to decide where the boundary for Planck docs should be 🙂 Ideally it would just describe Planck, but you are right, there is some documentation that goes a little farther.

2018-01-09T00:06:06.000226Z

thanks @mfikes ! Planck is cool

mfikes 2018-01-09T00:06:13.000344Z

Thanks!

2018-01-09T17:43:05.000084Z

@gas this isn’t because of macros - this is standard clojure / clojurescript behavior that you can’t use code until it’s loaded. Some projects have config to auto-load certain namespaces, this rarely includes auto-loading test namespaces.

2018-01-09T20:18:09.000450Z

@nosiemith thanks for the clarification. To much using boot/lein where I didnt realise it loaded the test namespaces.