-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat(config): allow configurable launchers, preprocessors, reporters #533
feat(config): allow configurable launchers, preprocessors, reporters #533
Conversation
I would love to be able to use the latest configuration style to share common configuration. Any idea when a release is coming? M |
Would love it too, especially for the ability to pass flag like |
karma.defineLauncher('my_chrome', 'Chrome', { flags: ['--start-maximized'] }); karma.definePreprocessor('coffee_bare', 'coffee', { options: { bare: true } }); karma.defineReporter('html_coverage', 'coverage', { ... }); The reason, why I decided for this solution, rather than inlining like this: browsers = [{ type: 'Chrome', flags: ['--start-maximized'] }]; Is that the solution above allows using these custom launchers from CLI. It also makes it easier to create only a single instance of a preprocessor (if the configuration is the same). Closes karma-runner#317
Sorry for delays, it's merged now. I hope to push a new release to npm this week. |
Awesome anyway to get more tolerant fs integration in that release? M |
Sure thing, check out the comments I sent, I will wait for that PR. Thanks a bunch @iammerrick ! |
I was testing out the @canary release of this today and ran into an issue with the defineLauncher working with a custom flag.
Version: During the launch with LOG_DEBUG turned on: Did I do something wrong not to have --disable-web-security make it into the path? |
@hppycoder Sorry, my bad. I didn't push chrome-launcher plugin to NPM. I'm getting all the plugins on automated tasks as Karma, so that I won't forget next time, hopefully ;-) Can you please update karma-chrome-launcher to 0.0.2 ? It should work then... |
@vojtajina - Perfect! Fixed the issue now and all seems to be working well. Thanks! |
For all you fine Mac friends out there, you will need to set your launcher to look like this. karma.defineLauncher('my_chrome','Chrome', {
flags: ['--args –-disable-web-security']
}); Notice that you have to first send in args, then follow it up with the disable-web-security. If not you will have a tab open in Chrome for nx --disable-web-security which isn't desired. |
@hppycoder and others, I think you gonna hate me... but check out this #604 ;-) |
The reason, why I decided for this solution, rather than inlining (as proposed in #317) is that this solution allows using these custom launchers/reporters from CLI. It also makes it easier to create only a single instance of a preprocessor (if the configuration is the same).
In addition to defining/configuring custom reporters/launchers/preprocessors, each can have a global config, eg:
What do you think ?