Plato on Github
Report Home
scripts/test-build.js
Maintainability
74.36
Lines of code
37
Difficulty
7.96
Estimated Errors
0.34
Function weight
By Complexity
By SLOC
'use strict'; var packagePath = __dirname + '/../../package.json'; var gulp = require('gulp'); var path = require('path'); var coverageBadger = require('istanbul-cobertura-badger'); var $ = require('gulp-load-plugins')({config: path.normalize(packagePath)}); var config = { name: 'scripts:test-build', config: 'test', callback: callback }; module.exports = config; ///////////////////////////// function callback(settings, done) { var testFiles = settings.test.shared; testFiles = testFiles.concat(settings.test.libs); testFiles = testFiles.concat(settings.test.spec); testFiles = testFiles.concat(settings.paths.build + '/' + settings.name+'.min.js'); return gulp.src(testFiles) .pipe($.karma({ configFile: './test/build.karma.conf.js', action: 'run' })) .pipe($.size({title: 'scripts:test-build'})) .on('end', function() { coverageBadger("./reports/coverage/PhantomJS 1.9.8 (Linux)/cobertura-coverage.xml", path.join(process.env.PWD, "./reports/coverage"), function() { process.exit(); }); }); }