Closed xcthulhu closed 6 years ago
Yes! PRs for this are welcomed.
Perhaps doo
could "absorb" what tach
currently does.
One pattern that occurs in projects is that ClojureScript unit tests are written using the doo-runner
namespace with the doo-tests
macro, which is ostensibly looks like the run-tests
macro, but makes things work within the context of doo
. Projects that are set up this way end up needing to duplicate their test namespace to a "conventional" "doo
-less" one that uses cljs.test
and run-tests
, so that Planck and Lumo can consume those test namespaces.
Here is a small example: https://github.com/stathissideris/spec-provider/commit/d7ab767b9aa6525ed3bbb3df251a6a3f929c577b
Perhaps instead, Lumo and Planck could be treated by doo
as js-env
environments of a sort, and projects like the above could just continue to use doo-tests
, but with that macro expanding to something that works when kicking off the tests in Lumo or Planck.
If you look at what lein tach lumo
does, it really just grabs a few things from project.clj
, sets up a classpath, and runs things in lumo
. Maybe all of this is within reach for doo
?
Absolutely!
From a quick skim of tach
, it seems like adding https://github.com/mfikes/tach/blob/master/src/leiningen/tach.clj#L44 in doo.runner
https://github.com/bensu/doo/blob/master/library/src/doo/runner.cljs#L41 and then adding the plank
and lumo
to doo.core/js->command*
will be the main (only?) integration points needed.
Much of the value of plank and lumo (startup speed) will be lost by going through lein doo
though but if users are already doing this, we might as well simplify for them.
Cool @bensu I'll see if I can put together a PR.
It would be nice to be able to run tests against Planck, which currently wraps JavaScriptCore.