Open jcsmorais opened 10 years ago
This is a significantly limiting feature of this module.
So, I looked into it a bit as well. It seems that the --arg=value
gets passed to the karma server as a config.client
arg, which only gets passed to the browser that's running. To summarize, these parameters don't change the karma configs.
What's needed is a way to pass karma config options in addition to this current usage of client.args
. I'd probably incorporate a module for arg parsing (like node-optimist).
It looks like this is a common (OPEN) issue: #91, #96
@jcsmorais @Jeff-Symphony what's the status of this PR?
Hi,
I'm currently running karma 0.12.16 and grunt-karma 0.9.0.
On Karma's configuration each setting has a
--arg
flag that allows one to use it while running karma through command line interfaces. I've been using grunt-karma for a while and noticed that these arguments don't seem to work while using it.After further investigation, I noticed the following:
Based on this it seems we are supporting
--arg=value
instead of the format Karma supports by default which is--arg value
- any reason why? Either way, specifying something like--browsers=Chrome,Firefox
doesn't seem to work - the browsers specified on Gruntfile.js keep being used instead.Plus, here we're defining
data
based onopts
andthis.data
giving precedence to the latter, bellow we're basically definingdata.browsers
based onthis.data.browsers
, maybe I'm missing something, but isn't this the same? The value ofthis.data.browsers
is already stored indata.browsers
due to the first statement, no?I would really like to see more support on CLI arguments, specially with compliance with what Karma has by default - I'm also willing to spend some time working on this, so any feedback is appreciated.