Function testTasks
has 287 lines of code (exceeds 25 allowed). Consider refactoring.
module.exports = function testTasks(gulp, context) {
var mocha = require("gulp-mocha");
var mkdirp = require("mkdirp");
var gutil = require("gulp-util");
var glob = require("glob");
Function testTasks
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
module.exports = function testTasks(gulp, context) {
var mocha = require("gulp-mocha");
var mkdirp = require("mkdirp");
var gutil = require("gulp-util");
var glob = require("glob");
Function testWriteCoverage
has 97 lines of code (exceeds 25 allowed). Consider refactoring.
gulp.task("write_coverage", function testWriteCoverage() {
var cwd = context.cwd;
var pkg = context.package;
var directories = pkg.directories;
var outputDir = path.join(cwd, directories.reports, "code-coverage");
File test.js
has 290 lines of code (exceeds 250 allowed). Consider refactoring.
"use strict";
* A module to add gulp tasks which run test steps.
* @exports tasks/testTasks
* @param {Gulp} gulp - The gulp module
Function test
has 67 lines of code (exceeds 25 allowed). Consider refactoring.
var test = function test(reporter, outputCoverageReports) {
var cwd = context.cwd;
var pkg = context.package;
var directories = pkg.directories;
var sourceGlobStr = directories.lib + "/**/*.js";
Similar blocks of code found in 2 locations. Consider refactoring.
gulp.task("test_cover_no_cov_report", function testCoverNoCovReportTask() {
var cwd = context.cwd;
var pkg = context.package;
var directories = pkg.directories;
var MOCHA_FILE_NAME = 'unit-mocha-tests' + (process.env.SELENIUM_PORT ? "-" + process.env.SELENIUM_PORT : "");
Similar blocks of code found in 2 locations. Consider refactoring.
gulp.task("test_cover", ["instrument"], function testCoverTask() {
var cwd = context.cwd;
var pkg = context.package;
var directories = pkg.directories;
var MOCHA_FILE_NAME = 'unit-mocha-tests' + (process.env.SELENIUM_PORT ? "-" + process.env.SELENIUM_PORT : "");
Identical blocks of code found in 2 locations. Consider refactoring.
return gulp.src(outputDir, {"read": false})
.pipe(istanbul.writeReports({
"dir": outputDir,
"coverageVariable": COVERAGE_VAR,
"reporters": ["html", "lcov", require("istanbul-reporter-clover-limits"), "json-summary"],
Identical blocks of code found in 2 locations. Consider refactoring.
return gulp.src(path.resolve(process.cwd(), directories.test + "/test.js"), {"read": false})
.pipe(mocha({
"compilers": {
"js": babel
},
Similar blocks of code found in 2 locations. Consider refactoring.
Object.keys(second.f).forEach(function processkeys(k) {
ret.f[k] += second.f[k];
});
Similar blocks of code found in 2 locations. Consider refactoring.
Object.keys(second.s).forEach(function processkeys(k) {
ret.s[k] += second.s[k];
});
Identical blocks of code found in 2 locations. Consider refactoring.
return gulp.src(path.resolve(process.cwd(), directories.test + "/test.js"), {"read": false})
.pipe(mocha({
"compilers": {
"js": babel
},
There are no issues that match your filters.