-
Notifications
You must be signed in to change notification settings - Fork 116
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
Respect the Grunt way of defining files #126
Comments
Does this way of defining files cause this warning:
for anyone else when using the -v option? |
This definitely causes the issue I mentioned above. This is a bug and should be raised as such. To workaround place your files in an karma.conf.js file. |
This is a blocker for me right now. I need all of my child configs to inherit the files definition that tells the server to serve my html fixtures, but currently I only have access to grunt style file definitions in the child sections, so I have to repeat the entry in each one. An options key name something like Using |
I created a helper that treats all the const gruntFiles = config.options.gruntFiles || [];
for(let key in config) {
if(key === 'options') continue;
const files = [{src: config[key].files || []}];
const extraGruntFiles = config[key].gruntFiles || [];
config[key].files = gruntFiles.concat(extraGruntFiles, files);
} I think my config makes a little more sense now. {
options: {
files: ['foo.js'],
gruntFiles: [{src: ['fixtures/*.html'], served: true, included: false}]
},
unit1: {
files: ['blah1.js', 'blah1.spec.js'],
},
unit2: {
files: ['blah2.js'],
gruntFiles: [{pattern: 'blah2.*.spec.js'}]
}
} |
Right now, grunt-karma needs a dedicated "files" property in the options config object, e.g.
It is not possible to use the Grunt way of defining files http://gruntjs.com/configuring-tasks#files.
But it should, as grunt-karma is a Grunt plugin, after all.
The text was updated successfully, but these errors were encountered: