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

Add a log line when auto test finished #72

Closed danielcompton closed 8 years ago

danielcompton commented 8 years ago

When testing with Karma, it's not always really clear when the current test has finished. I'm not sure if this is a Karma thing or a doo thing though?

Running the tests it changes from

$lein doo chrome test once

;; ======================================================================
;; Testing with Chrome:

LOG: 'Testing ns.base.test-runner'
LOG: 'Testing ns.test1'
LOG: 'Testing ns.test2'
Chrome 46.0.2490 (Mac OS X 10.11.1): Executed 0 of 7 (0 secs / 0 secs)

to

$lein doo chrome test once

;; ======================================================================
;; Testing with Chrome:

LOG: 'Testing ns.base.test-runner'
LOG: 'Testing ns.test1'
LOG: 'Testing ns.test2'
Chrome 46.0.2490 (Mac OS X 10.11.1): Executed 7 of 7 SUCCESS (0.163 secs / 2.945 secs)
bensu commented 8 years ago

If you see the problem with once, it's easy, the tests are not done until the shell prompt comes back. If you are confused about the last test, 7 of 7 means it is done.

I don't think it is necessary to add another logging statement saying "The tests are done" which might be a problem if something is not properly configured, the tests are not run, and the user sees "The tests are done".

bensu commented 8 years ago

@danielcompton after looking at this again, Karma first shows "Executed 0 of 7" and then changes 0 to 7 as the tests are run. I haven't researched it enough, but there is not much we can do about it.