Gulp plugin for karma
What this?
This is a gulp plugin for karma
How can I use it?
Generally, you can use it by normal approach. i.e. like this:
gulpfile.js
{ "use strict"; const g = ; const karma = ; g;}require;
Note that the options are equivalent to Karma configucation options
gulp.watch
Deal with Considering browser ready event, dealing with gulp.watch
might be a
little-bit tricky, because you might need to start runner task after ensuring
the server is ready, while gulp task finishes when the server is closed.
To handle this issue, you can declare the server task as asynchronous task,
and call the callback when karma.server.browsers_ready
event is emitted.
In particular, like this:
gulpfile.js
{ const gulp = ; const karma = ; const config = autoWatch: false quiet: true frameworks: 'mocha' 'chai' browsers: 'ChromeHeadless' plugins: 'karma-mocha' 'karma-chai' 'karma-chrome-launcher' ; gulp; gulp; gulp;}require;
Contribution
Before you create an issue/pull request,
- Read the code
- Read the code again
- Understand the code
- Understand the code again.