Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide the ability to add arbitrary Karma plugins #43

Closed
danielcompton opened this issue Oct 19, 2015 · 4 comments
Closed

Provide the ability to add arbitrary Karma plugins #43

danielcompton opened this issue Oct 19, 2015 · 4 comments
Milestone

Comments

@danielcompton
Copy link
Contributor

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:

  • Add a command to allow people to generate a karma.conf.js file to disk and then they can add their plugins, configuration, e.t.c. to that static file. The problem with this approach is regenerating it when things change, and it getting out of date.
  • Allow extra arguments to be passed on the command line. Some Karma plugins can be activated by this method, though they probably still need some config provided
  • Allow people to provide extra config which gets merged into the map used for creating karma.conf.js. This would be somewhat similar to how Leiningen merges profiles into the main project config.

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
Copy link
Owner

bensu commented Oct 21, 2015

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
Copy link

cdorrat commented Jun 13, 2016

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
Copy link

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

@miikka
Copy link
Collaborator

miikka commented Mar 13, 2018

#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"].

@miikka miikka closed this as completed Mar 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants