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

Provide the ability to add arbitrary Karma plugins #43

Closed danielcompton closed 6 years ago

danielcompton commented 8 years ago

I'd like to be able to add karma-junit-reporter to my karma.conf.js file. I can imagine in the long run that lots of people will all want to install their own Karma plugins. There are a few ways to accomodate this:

This presupposes that the Karma plugins will be able to understand the output of doo tests, I'm not sure if that's the case.

Relates to #34.

bensu commented 8 years ago

Tricky. If doo every supports something like this, it will probably follow the last option, a merged in config. To see if this is needed, we should first explore/solve #34 either through docs or features and after that think about plugins in general.

cdorrat commented 8 years ago

Pull request 108 hasn't been reviewed yet but it adds the ability to add arbitrary config to karma.conf.js by adding it to project.clj. I've successfully generated junit outut with the karma plugin by adding the following to my :doo section in project.clj

 :karma {:config {"reporters" ["progress", "junit"]
                         "plugins" ["karma-junit-reporter"]
                         "junitReporter" {"outputDir" "test-output"}}}

It's limited to karma tests but does help with issue #34

not-raspberry commented 8 years ago

Possibility to use own karma.conf.js would allow us to work around this problem: https://github.com/karma-runner/karma/issues/1344

miikka commented 6 years ago

108 has been merged and it's now possible to pass custom Karma configuration. See README. This feature is included in [lein-doo "0.1.9"].