Closed nathasm closed 9 years ago
This is needed as the file list in a karma config supports objects such as {pattern: '*.png', include: false, serve: true}
Same.
One workaround is pass a valid glob pattern for a directory that doesn't exist
gulp.task('karma', function () {
return gulp.src('./idontexist')
.pipe(karma({
configFile: 'karma.conf.js',
action: 'run'
}));
});
Given the overlap between karma and gulp (watching, file globs), this plugin needs a serious refactoring to be useful. @alexgorbatchev will be looking into this and working on a strategy to go forward with.
@lazd feel free to borrow some of the ideas we did in grunt-karma
Comparing the two, they seem to pretty much do the same thing at the moment. I'm not really clear on why karma server is started in a separate node process though. Does anyone have any insights?
Great plugin. It would be nice to keep the list of files by default in karma.conf.js instead of gulpfile.js. Otherwise it is a bit confusing to me.
Finally getting back to addressing these issues, and it's become clear that gulp-karma
should not exist.
Please take a look at https://github.com/lazd/gulp-karma/issues/21#issuecomment-40786028 a start at a simple, clean solution that works great with gulp.
Hello drkibitz and lazd, I was struggling with the fixtures issue mentioned above. As a quick fix I decided to add them to the options object Then included them later in the gulp-karma index.js "endStream" function
Hoping this prevent others searching for a way to include non js files
gulp-karma
is deprecated (#43). Please use Karma directly: https://github.com/karma-runner/gulp-karma
I've been trying to figure out a way to use my existing karma.conf.js file that already has a list of the test files.
Is there a way to pull the files property from the karma.conf.js file without having to put the file list in my gulp.js file?