bensu / doo

doo is a library and lein plugin to run cljs.test on different js environments.
Eclipse Public License 1.0
324 stars 63 forks source link

Allow leiningen plugin to test with multiple js-envs #13

Closed jeluard closed 9 years ago

jeluard commented 9 years ago

It would be nice to have some special syntax to support running tests with multiple js-env.

e.g.

lein doo phantom,slimer test
bensu commented 9 years ago

Definitely on the roadmap. I was thinking both

lein doo [phantom, slimer] test

but also optional in project.clj

:doo {:engines [:node :rhino]
      :browsers [:phantom :slimer]
      :all [:engines :browsers]}

so then

lein doo engines functional-test

lein doo browsers dom-test
jeluard commented 9 years ago

Nice! I actually like the second option better.

bensu commented 9 years ago

After thinking about it, I thought we might start wtih this:

 lein doo browsers test

which runs the script in slimer and phantom.

The current supported js-environments and compiler restrictions don't allow for much more. For example, rhino and node can't currently run together because of compiler restrictions on node. I'll revise this whenever I add a new js-env or lift a compiler restriction.

@jeluard the changes were deployed under 0.1.4-SNAPSHOT, try them out and let me know how it goes.

jeluard commented 9 years ago

I just gave it a shot and it works fine! I guess this implementation makes sense with current runners.

One thing that you might want to add is some output indicating which runner is running when using browsers.

bensu commented 9 years ago

I did!

Try it again after cleaning ~/.m2/repositories/doo and let me know if you can't see "Testing with Slimer"

jeluard commented 9 years ago

Actually I am using doo in once mode and it appears it's not displayed here.

bensu commented 9 years ago

That's right, thanks for the report. The fix is deployed.

jeluard commented 9 years ago

Great!

bensu commented 9 years ago

@jeluard 0.1.5-SNAPSHOT has support for many browsers, so I added the :alias option to cover your needs (see the Alias in the README). Also, the alias browsers is now changed to headless.

jeluard commented 9 years ago

Thanks for the heads up!