core.matrix icon indicating copy to clipboard operation
core.matrix copied to clipboard

ClojureScript testing from Clojure

Open mikera opened this issue 8 years ago • 9 comments

We need a way to run the ClojureScript tests from within the Clojure test suite, in order to prevent regressions from slipping in when the Clojure code is updated.

See issues like: https://github.com/mikera/core.matrix/issues/297

mikera avatar Oct 07 '16 01:10 mikera

@rosejn any good ideas?

mikera avatar Oct 07 '16 01:10 mikera

Ok, I'm sure we can figure something out. A couple ideas:

  • open a browser window that runs the js tests
  • run tests with Nashorn
  • run with nodejs

rosejn avatar Oct 07 '16 14:10 rosejn

I think that doo is a popular solution for testing clojurescript and can probably be integrated pretty easily into lein test

charlesg3 avatar Feb 28 '17 20:02 charlesg3

Sounds plausible. We need it to work with Maven though (that's a requirement for Clojure Contrib)

mikera avatar Mar 01 '17 02:03 mikera

​Hi - Any updates to this? I've been using the Doo testing framework lately and have a nice template project. Alan​

On Tue, Feb 28, 2017 at 6:01 PM, Mike Anderson [email protected] wrote:

Sounds plausible. We need it to work with Maven though (that's a requirement for Clojure Contrib)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mikera/core.matrix/issues/298#issuecomment-283221918, or mute the thread https://github.com/notifications/unsubscribe-auth/AGwXB3E2McqOuEICX3FD12K2xNq1ufWJks5rhNF4gaJpZM4KQlot .

cloojure avatar Jun 22 '18 19:06 cloojure

Does doo run from maven? i.e. can it run with mvn test?

mikera avatar Jun 27 '18 10:06 mikera

Hi - I run it from lein:

lein doo phantom test once

​It can also use Chrome as the driver (instead of PhantomJS). Here is a demo project: https://github.com/cloojure/cljs-template Alan ​

On Wed, Jun 27, 2018 at 3:49 AM, Mike Anderson [email protected] wrote:

Does doo run from maven? i.e. can it run with mvn test?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mikera/core.matrix/issues/298#issuecomment-400630208, or mute the thread https://github.com/notifications/unsubscribe-auth/AGwXB6wPwvJQDeNrX5IQ15wfA9uiOFOYks5uA2NKgaJpZM4KQlot .

cloojure avatar Jul 03 '18 18:07 cloojure

The runner's namespace is

(ns doo.runner
  (:require [cljs.test]
            [cljs.analyzer.api :as ana-api]))

which makes me hypothesize that running it with maven would work. I will try it tomorrow if no one has by then.

On Tue, Jul 3, 2018, 13:50 Alan Thompson [email protected] wrote:

Hi - I run it from lein:

lein doo phantom test once

​It can also use Chrome as the driver (instead of PhantomJS). Here is a demo project: https://github.com/cloojure/cljs-template Alan ​

On Wed, Jun 27, 2018 at 3:49 AM, Mike Anderson [email protected] wrote:

Does doo run from maven? i.e. can it run with mvn test?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub <https://github.com/mikera/core.matrix/issues/298#issuecomment-400630208 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AGwXB6wPwvJQDeNrX5IQ15wfA9uiOFOYks5uA2NKgaJpZM4KQlot

.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mikera/core.matrix/issues/298#issuecomment-402257854, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOuMgkjv4H2s7iBuwRUxoB7-HTLLCkWks5uC7zxgaJpZM4KQlot .

mathpunk avatar Jul 04 '18 04:07 mathpunk

I've never actually used maven before. My googling taught me a bit of history and reasoning behind using maven for clojure-contrib, and I got as far as finding https://github.com/talios/clojure-maven-plugin before I ran out of open source time this morning.

mathpunk avatar Jul 04 '18 16:07 mathpunk