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

client properties overwritten when using configFile #119

Closed
zoltan-mihalyi opened this issue Jul 4, 2014 · 1 comment
Closed

client properties overwritten when using configFile #119

zoltan-mihalyi opened this issue Jul 4, 2014 · 1 comment

Comments

@zoltan-mihalyi
Copy link

When using the config file it does not work:

client: {
    useIframe: true
}

But the same config works in Gruntfile

@cevou
Copy link
Contributor

cevou commented Dec 16, 2014

I have the same issue. grunt-karma always passes some client default values:, see: https://github.com/karma-runner/grunt-karma/blob/master/tasks/grunt-karma.js#L33-L38

In the karma config you can see (https://github.com/karma-runner/karma/blob/master/lib/config.js#L278-L288) that first the config.set from the config file is called and after that config.set is called again with the cliArgs (which have some default set in grunt-karma). This will always overwrite the client settings from the config file.

I think that the creation of default values should not be done in grunt-karma. If there are no client arguments set in the config file, the default values are used anyway directly by karma, see https://github.com/karma-runner/karma/blob/dd1971fffc3a7f758c89119aa7307f71df26b37f/lib/config.js#L228-L232

If it's OK i would provide a pull request where the coding is removed. For that the arguments also have to be handled differently. They should only be handled if they are actually set.

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.

3 participants