UNPKG

aurelia-templating

Version:

An extensible HTML templating engine supporting databinding, custom elements, attached behaviors and more.

44 lines (40 loc) 994 B
var gulp = require('gulp'); var Karma = require('karma').Server; /** * Run test once and exit */ gulp.task('test', function (done) { new Karma({ configFile: __dirname + '/../../karma.conf.js', singleRun: true }, done).start(); }); /** * Watch for file changes and re-run tests on each change */ gulp.task('tdd', function (done) { new Karma({ configFile: __dirname + '/../../karma.conf.js' }, done).start(); }); /** * Run test once with code coverage and exit */ gulp.task('cover', function (done) { new Karma({ configFile: __dirname + '/../../karma.conf.js', singleRun: true, reporters: ['progress', 'coverage'], preprocessors: { 'test/**/*.js': ['babel'], 'src/**/*.js': ['babel', 'coverage'] }, coverageReporter: { dir: 'build/reports/coverage', reporters: [ { type: 'html', subdir: 'report-html' }, { type: 'json', subdir: '.', file: 'coverage-final.json' } ] } }, done).start(); });