Fork me on GitHub
#planck
<
2018-01-09
>
gas00:01:37

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

mfikes00:01:54

Does anything load 'tsp.testcore?

gas00:01:25

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

gas00:01:25

doh! cheers

mfikes00:01:48

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

mfikes00:01:27

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

mfikes00:01:17

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

mfikes00:01:54

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

gas00:01:54

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..

mfikes00:01:01

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.

gas00:01:06

thanks @mfikes ! Planck is cool

noisesmith17:01:05

@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.

gas20:01:09

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