gulp-modular-karma
Modular extension to run unit tests in a gulp-modular project.
Installation
npm install gulp-modular-karma
bower install angular-mocks
Karma configuration
Copy default.karma.conf.js
in your project root and name it karma.conf.js
.
Integration in gulpfile
var gulp = require('gulp');
var gulpModularKarma = require('gulp-modular-karma');
var config = {
karma: {
},
};
gulpModularKarma(gulp, config);
Usage
Run gulp karma
to execute the tests once.
Run gulp karma:watch
to execute the tests whenever a file changes.
Run gulp karma:all
to run the tests in all defined browers.
Run gulp test
, gulp test:watch
or gulp test:all
to build the project before the related karma
task is run.